mirror of
https://github.com/nextcloud/talk-android
synced 2025-01-18 05:01:28 +00:00
use lifecycleScope from chatActivity in OutcomingTextMessageViewHolder
defining an own scope and clearing it via onViewRecycled did not work out somehow (offline icon was wrong) Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
6e1114d4d8
commit
69ddeaa06a
@ -14,6 +14,7 @@ import android.util.Log
|
||||
import android.util.TypedValue
|
||||
import android.view.View
|
||||
import androidx.core.content.res.ResourcesCompat
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import autodagger.AutoInjector
|
||||
import coil.load
|
||||
import com.google.android.flexbox.FlexboxLayout
|
||||
@ -133,7 +134,9 @@ class OutcomingTextMessageViewHolder(itemView: View) :
|
||||
updateStatus(R.drawable.ic_check, context.resources?.getString(R.string.nc_message_sent))
|
||||
}
|
||||
|
||||
CoroutineScope(Dispatchers.Main).launch {
|
||||
val chatActivity = commonMessageInterface as ChatActivity
|
||||
|
||||
chatActivity.lifecycleScope.launch {
|
||||
if (message.isTemporary && !networkMonitor.isOnline.value) {
|
||||
updateStatus(
|
||||
R.drawable.ic_signal_wifi_off_white_24dp,
|
||||
|
Loading…
Reference in New Issue
Block a user