parent
1b9cf631be
commit
820a5bc363
1 changed files with 3 additions and 1 deletions
|
@ -66,10 +66,12 @@ object V166_ThreadAndMessageForeignKeys : SignalDatabaseMigration {
|
|||
Log.w(TAG, "There were $count threads for RecipientId::$recipientId. Merging.", true)
|
||||
|
||||
val threads: List<ThreadInfo> = getThreadsByRecipientId(db, cursor.requireLong("thread_recipient_id"))
|
||||
if (threads.size > 1) {
|
||||
mergeThreads(db, threads)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun getThreadsByRecipientId(db: SQLiteDatabase, recipientId: Long): List<ThreadInfo> {
|
||||
return db.rawQuery("SELECT _id, date FROM thread WHERE thread_recipient_id = ?".trimIndent(), recipientId).readToList { cursor ->
|
||||
|
|
Loading…
Add table
Reference in a new issue