mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-01-19 11:51:40 +01:00
Fixed marking as read/unread not refreshing list
This commit is contained in:
parent
90fcc031bc
commit
d2d291069c
@ -694,7 +694,7 @@ class ThreadActivity : SimpleActivity() {
|
||||
}
|
||||
|
||||
private fun sendMessage() {
|
||||
val msg = thread_type_message.value
|
||||
var msg = thread_type_message.value
|
||||
if (msg.isEmpty() && attachmentSelections.isEmpty()) {
|
||||
return
|
||||
}
|
||||
|
@ -217,6 +217,11 @@ class ConversationsAdapter(
|
||||
conversationsMarkedAsUnread.filter { conversation -> conversation.read }.forEach {
|
||||
activity.markThreadMessagesUnread(it.threadId)
|
||||
}
|
||||
|
||||
activity.runOnUiThread {
|
||||
refreshMessages()
|
||||
finishActMode()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,7 @@ import com.simplemobiletools.smsmessenger.extensions.markThreadMessagesRead
|
||||
import com.simplemobiletools.smsmessenger.extensions.updateUnreadCountBadge
|
||||
import com.simplemobiletools.smsmessenger.helpers.MARK_AS_READ
|
||||
import com.simplemobiletools.smsmessenger.helpers.THREAD_ID
|
||||
import com.simplemobiletools.smsmessenger.helpers.refreshMessages
|
||||
|
||||
class MarkAsReadReceiver : BroadcastReceiver() {
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
@ -21,6 +22,7 @@ class MarkAsReadReceiver : BroadcastReceiver() {
|
||||
context.markThreadMessagesRead(threadId)
|
||||
context.conversationsDB.markRead(threadId)
|
||||
context.updateUnreadCountBadge(context.conversationsDB.getUnreadConversations())
|
||||
refreshMessages()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user