aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/gultsch/chat/persistance
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-10 15:24:34 +0100
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-10 15:24:34 +0100
commitcfc74e7c8e912c7a194ad674ec5f98ab6950640f (patch)
tree95aae079591ae9462697499a965ec89b13a83113 /src/de/gultsch/chat/persistance
parent2d0c0e6a4081955b68669c82071a5099e2e1a96e (diff)
fixed a bug where account options where toggled instead of set off. fixed null pointer for missing selfi. made sefli optional
Diffstat (limited to 'src/de/gultsch/chat/persistance')
-rw-r--r--src/de/gultsch/chat/persistance/DatabaseBackend.java6
1 files changed, 3 insertions, 3 deletions
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;