mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-30 15:36:41 +00:00
Some identity key handling changes
1) Prefetch identity keys when possible 2) Always accept prefetched keys or keys from incoming messages 3) Block sending only if it's a recent change, or if always block is enabled // FREEBIE
This commit is contained in:
@@ -83,7 +83,7 @@ public class ThreadDatabase extends Database {
|
||||
|
||||
public static final String[] CREATE_INDEXS = {
|
||||
"CREATE INDEX IF NOT EXISTS thread_recipient_ids_index ON " + TABLE_NAME + " (" + RECIPIENT_IDS + ");",
|
||||
"CREATE INDEX IF NOT EXISTS archived_index ON " + TABLE_NAME + " (" + ARCHIVED + ");",
|
||||
"CREATE INDEX IF NOT EXISTS archived_count_index ON " + TABLE_NAME + " (" + ARCHIVED + ", " + MESSAGE_COUNT + ");",
|
||||
};
|
||||
|
||||
public ThreadDatabase(Context context, SQLiteOpenHelper databaseHelper) {
|
||||
@@ -339,7 +339,7 @@ public class ThreadDatabase extends Database {
|
||||
|
||||
public Cursor getConversationList() {
|
||||
SQLiteDatabase db = databaseHelper.getReadableDatabase();
|
||||
Cursor cursor = db.query(TABLE_NAME, null, ARCHIVED + " = ?", new String[] {"0"}, null, null, DATE + " DESC");
|
||||
Cursor cursor = db.query(TABLE_NAME, null, ARCHIVED + " = ? AND " + MESSAGE_COUNT + " != 0", new String[] {"0"}, null, null, DATE + " DESC");
|
||||
|
||||
setNotifyConverationListListeners(cursor);
|
||||
|
||||
@@ -348,7 +348,7 @@ public class ThreadDatabase extends Database {
|
||||
|
||||
public Cursor getArchivedConversationList() {
|
||||
SQLiteDatabase db = databaseHelper.getReadableDatabase();
|
||||
Cursor cursor = db.query(TABLE_NAME, null, ARCHIVED + " = ?", new String[] {"1"}, null, null, DATE + " DESC");
|
||||
Cursor cursor = db.query(TABLE_NAME, null, ARCHIVED + " = ? AND " + MESSAGE_COUNT + " != 0", new String[] {"1"}, null, null, DATE + " DESC");
|
||||
|
||||
setNotifyConverationListListeners(cursor);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user