-Added failsafe in case '%s' is not in the string

-Causes the links to be appended at the end
This commit is contained in:
xSooDx
2015-07-21 20:57:11 +05:30
parent ef9a1c23f3
commit 7c15dc0b89

View File

@@ -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;
}