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