removing the id field at conversations, use thread_id
This commit is contained in:
parent
1c6d19c986
commit
d1616d4997
6 changed files with 30 additions and 21 deletions
|
|
@ -203,12 +203,12 @@ class MainActivity : SimpleActivity() {
|
|||
|
||||
cachedConversations.forEach { cachedConversation ->
|
||||
if (!conversations.map { it.threadId }.contains(cachedConversation.threadId)) {
|
||||
conversationsDB.delete(cachedConversation.id!!)
|
||||
conversationsDB.deleteThreadId(cachedConversation.threadId)
|
||||
}
|
||||
}
|
||||
|
||||
cachedConversations.forEach { cachedConversation ->
|
||||
val conv = conversations.firstOrNull { it.threadId == cachedConversation.threadId && it.getStringToCompare() != cachedConversation.getStringToCompare() }
|
||||
val conv = conversations.firstOrNull { it.threadId == cachedConversation.threadId && it.toString() != cachedConversation.toString() }
|
||||
if (conv != null) {
|
||||
conversationsDB.insertOrUpdate(conv)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue