mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-01-26 15:04:54 +01:00
small performance improvement
This commit is contained in:
parent
d139548f06
commit
1a5f055cd9
@ -5,6 +5,7 @@ import android.content.Intent
|
|||||||
import android.graphics.Typeface
|
import android.graphics.Typeface
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.text.TextUtils
|
import android.text.TextUtils
|
||||||
|
import android.util.Log
|
||||||
import android.util.TypedValue
|
import android.util.TypedValue
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.view.View
|
import android.view.View
|
||||||
@ -191,9 +192,8 @@ class ConversationsAdapter(
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
val conversationsMarkedAsRead = conversations.filter { selectedKeys.contains(it.hashCode()) } as ArrayList<Conversation>
|
val conversationsMarkedAsRead = conversations.filter { selectedKeys.contains(it.hashCode()) } as ArrayList<Conversation>
|
||||||
|
|
||||||
ensureBackgroundThread {
|
ensureBackgroundThread {
|
||||||
conversationsMarkedAsRead.forEach {
|
conversationsMarkedAsRead.filter{el -> !el.read}.forEach {
|
||||||
activity.markThreadMessagesRead(it.threadId)
|
activity.markThreadMessagesRead(it.threadId)
|
||||||
}
|
}
|
||||||
activity.runOnUiThread {
|
activity.runOnUiThread {
|
||||||
|
Loading…
Reference in New Issue
Block a user