From 0ee64124fe317f6959d1ff61cc9e70b272bf8eb5 Mon Sep 17 00:00:00 2001 From: Andreas Straub Date: Mon, 20 Jul 2015 22:02:54 +0200 Subject: [PATCH] Fix getNumTrustedKeys --- .../eu/siacs/conversations/persistance/DatabaseBackend.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java b/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java index 71b4cba9a..6091b352e 100644 --- a/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java +++ b/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java @@ -863,11 +863,13 @@ public class DatabaseBackend extends SQLiteOpenHelper { SQLiteDatabase db = getReadableDatabase(); String[] args = { account.getUuid(), - name + name, + String.valueOf(AxolotlService.SQLiteAxolotlStore.Trust.TRUSTED.ordinal()) }; return DatabaseUtils.queryNumEntries(db, AxolotlService.SQLiteAxolotlStore.IDENTITIES_TABLENAME, AxolotlService.SQLiteAxolotlStore.ACCOUNT + " = ?" - + " AND " + AxolotlService.SQLiteAxolotlStore.NAME + " = ?", + + " AND " + AxolotlService.SQLiteAxolotlStore.NAME + " = ?" + + " AND " + AxolotlService.SQLiteAxolotlStore.TRUSTED + " = ?", args ); }