-Added failsafe in case '%s' is not in the string
-Causes the links to be appended at the end
This commit is contained in:
1 parent
ef9a1c23f3
commit
7c15dc0b89
1 file changed
+6
-2
+6
-2
@@ -269,8 +269,12 @@ public class ViewKeyTrustFragment extends LoaderFragment implements
|
||||
private SpannableStringBuilder insertLinks(SpannableStringBuilder proofLinks,String proofType){
|
||||
SpannableStringBuilder ssb = new SpannableStringBuilder();
|
||||
ssb.append(proofType);
|
||||
int i = proofType.indexOf("%s");
|
||||
ssb.replace(i,i+2,proofLinks);
|
||||
if(proofType.contains("%s")){
|
||||
int i = proofType.indexOf("%s");
|
||||
ssb.replace(i,i+2,proofLinks);
|
||||
}
|
||||
else ssb.append(proofLinks);
|
||||
|
||||
return ssb;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user