mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-16 05:55:04 -05:00
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() {
|
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) {
|
||||||
|
final String print = prints.getString(i);
|
||||||
|
if (print != null && !print.isEmpty()) {
|
||||||
fingerprints.add(prints.getString(i));
|
fingerprints.add(prints.getString(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (final JSONException ignored) {
|
} catch (final JSONException ignored) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user