From ee5343fcb63952469ade90ae005424956aa59aa3 Mon Sep 17 00:00:00 2001 From: xSooDx Date: Tue, 4 Aug 2015 16:24:12 +0530 Subject: renamed the insertLinks() method to formatSpannableString() and added comment about its functionality --- .../org/sufficientlysecure/keychain/ui/ViewKeyTrustFragment.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenKeychain') diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyTrustFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyTrustFragment.java index a15ec4151..092ab40d6 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyTrustFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyTrustFragment.java @@ -256,7 +256,7 @@ public class ViewKeyTrustFragment extends LoaderFragment implements i++; } appendProofLinks(ssb, fingerprint, proofsFor[i]); - proofList.add(insertLinks(ssb,getProofNarrative(proofType))); + proofList.add(formatSpannableString(ssb, getProofNarrative(proofType))); } } @@ -266,7 +266,10 @@ public class ViewKeyTrustFragment extends LoaderFragment implements return new ResultPage(getString(R.string.key_trust_results_prefix), proofList); } - private SpannableStringBuilder insertLinks(SpannableStringBuilder proofLinks,String proofType){ + private SpannableStringBuilder formatSpannableString(SpannableStringBuilder proofLinks,String proofType){ + //Formatting SpannableStringBuilder with String.format() causes the links to stop working. + //This method is to insert the links while reserving the links + SpannableStringBuilder ssb = new SpannableStringBuilder(); ssb.append(proofType); if(proofType.contains("%s")){ -- cgit v1.2.3