-Added failsafe in case '%s' is not in the string
-Causes the links to be appended at the end
This commit is contained in:
@@ -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