diff options
author | bobufa <bobufa@users.noreply.github.com> | 2018-07-25 20:41:51 +0200 |
---|---|---|
committer | bobufa <bobufa@users.noreply.github.com> | 2018-08-13 22:39:18 +0200 |
commit | e376a577b6bfcdd9bdc0cc6ca283d99199a0197a (patch) | |
tree | 741cab1ce822fcfc89655e762abfe2ceb3892357 /libdino/src/service/database.vala | |
parent | 4901b096708ff5ca54c3e5393de74f2a8be55894 (diff) | |
download | dino-e376a577b6bfcdd9bdc0cc6ca283d99199a0197a.tar.gz dino-e376a577b6bfcdd9bdc0cc6ca283d99199a0197a.zip |
improve sidebar UI
- only display messages that are content items
- only display messages for active accounts
- "fix" textview issue
- add empty states (no search, no results)
Diffstat (limited to 'libdino/src/service/database.vala')
-rw-r--r-- | libdino/src/service/database.vala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libdino/src/service/database.vala b/libdino/src/service/database.vala index 01cc2f52..bea07dda 100644 --- a/libdino/src/service/database.vala +++ b/libdino/src/service/database.vala @@ -43,8 +43,9 @@ public class Database : Qlite.Database { public Column<int> foreign_id = new Column.Integer("foreign_id") { not_null = true }; internal ContentTable(Database db) { - base(db, "content"); + base(db, "contentx"); init({id, conversation_id, time, local_time, content_type, foreign_id}); + unique({content_type, foreign_id}, "IGNORE"); } } @@ -227,7 +228,7 @@ public class Database : Qlite.Database { message.fts_rebuild(); } else if (oldVersion < 8) { exec(""" - insert into content (conversation_id, time, local_time, content_type, foreign_id) + insert into contentx (conversation_id, time, local_time, content_type, foreign_id) select conversation.id, message.time, message.local_time, 1, message.id from message join conversation on message.account_id=conversation.account_id and |