mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-02-16 11:40:51 +01:00
Move thread handling to unarchiveConversation method
This commit is contained in:
parent
b9f956f7e8
commit
e86e089dc5
@ -26,7 +26,7 @@ class ArchivedConversationsAdapter(
|
|||||||
|
|
||||||
when (id) {
|
when (id) {
|
||||||
R.id.cab_delete -> askConfirmDelete()
|
R.id.cab_delete -> askConfirmDelete()
|
||||||
R.id.cab_unarchive -> ensureBackgroundThread { unarchiveConversation() }
|
R.id.cab_unarchive -> unarchiveConversation()
|
||||||
R.id.cab_select_all -> selectAll()
|
R.id.cab_select_all -> selectAll()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -64,12 +64,14 @@ class ArchivedConversationsAdapter(
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
val conversationsToUnarchive = currentList.filter { selectedKeys.contains(it.hashCode()) } as ArrayList<Conversation>
|
ensureBackgroundThread {
|
||||||
conversationsToUnarchive.forEach {
|
val conversationsToUnarchive = currentList.filter { selectedKeys.contains(it.hashCode()) } as ArrayList<Conversation>
|
||||||
activity.updateConversationArchivedStatus(it.threadId, false)
|
conversationsToUnarchive.forEach {
|
||||||
}
|
activity.updateConversationArchivedStatus(it.threadId, false)
|
||||||
|
}
|
||||||
|
|
||||||
removeConversationsFromList(conversationsToUnarchive)
|
removeConversationsFromList(conversationsToUnarchive)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun removeConversationsFromList(removedConversations: List<Conversation>) {
|
private fun removeConversationsFromList(removedConversations: List<Conversation>) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user