From cfc74e7c8e912c7a194ad674ec5f98ab6950640f Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 10 Feb 2014 15:24:34 +0100 Subject: fixed a bug where account options where toggled instead of set off. fixed null pointer for missing selfi. made sefli optional --- src/de/gultsch/chat/persistance/DatabaseBackend.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/de/gultsch/chat/persistance') diff --git a/src/de/gultsch/chat/persistance/DatabaseBackend.java b/src/de/gultsch/chat/persistance/DatabaseBackend.java index 58f052ec..b3290ee0 100644 --- a/src/de/gultsch/chat/persistance/DatabaseBackend.java +++ b/src/de/gultsch/chat/persistance/DatabaseBackend.java @@ -38,8 +38,8 @@ public class DatabaseBackend extends SQLiteOpenHelper { + " NUMBER)"); db.execSQL("create table " + Conversation.TABLENAME + " (" + Conversation.UUID + " TEXT PRIMARY KEY, " + Conversation.NAME - + " TEXT, " + Conversation.PHOTO_URI + " TEXT, " - + Conversation.ACCOUNT + " TEXT, " + Conversation.CONTACT + + " TEXT, " + Conversation.CONTACT + " TEXT, " + + Conversation.ACCOUNT + " TEXT, " + Conversation.CONTACTJID + " TEXT, " + Conversation.CREATED + " NUMBER, " + Conversation.STATUS + " NUMBER," + Conversation.MODE + " NUMBER," + "FOREIGN KEY(" + Conversation.ACCOUNT @@ -139,7 +139,7 @@ public class DatabaseBackend extends SQLiteOpenHelper { SQLiteDatabase db = this.getReadableDatabase(); String[] selectionArgs = { account.getUuid(), contactJid }; Cursor cursor = db.query(Conversation.TABLENAME, null, - Conversation.ACCOUNT + "=? AND " + Conversation.CONTACT + "=?", + Conversation.ACCOUNT + "=? AND " + Conversation.CONTACTJID + "=?", selectionArgs, null, null, null); if (cursor.getCount() == 0) return null; -- cgit v1.2.3