don't include empty fingerprints in list of otrfingerprints
This commit is contained in:
parent
6b047bed97
commit
40335785aa
|
@ -266,15 +266,17 @@ public class Contact implements ListItem {
|
|||
}
|
||||
|
||||
public ArrayList<String> getOtrFingerprints() {
|
||||
ArrayList<String> fingerprints = new ArrayList<String>();
|
||||
final ArrayList<String> fingerprints = new ArrayList<String>();
|
||||
try {
|
||||
if (this.keys.has("otr_fingerprints")) {
|
||||
JSONArray prints = this.keys
|
||||
.getJSONArray("otr_fingerprints");
|
||||
final JSONArray prints = this.keys.getJSONArray("otr_fingerprints");
|
||||
for (int i = 0; i < prints.length(); ++i) {
|
||||
final String print = prints.getString(i);
|
||||
if (print != null && !print.isEmpty()) {
|
||||
fingerprints.add(prints.getString(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (final JSONException ignored) {
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue