|
|
@@ -12,6 +12,7 @@ import com.adealink.frame.aab.util.getCompatDrawable
|
|
|
import com.adealink.frame.aab.util.getCompatString
|
|
|
import com.adealink.frame.base.EXTRA_INVITE_UID_CODE
|
|
|
import com.adealink.frame.base.Rlt
|
|
|
+import com.adealink.frame.coroutine.dispatcher.Dispatcher
|
|
|
import com.adealink.frame.image.view.NetworkImageView
|
|
|
import com.adealink.frame.imkit.widget.adapter.IViewProviderListener
|
|
|
import com.adealink.frame.imkit.widget.adapter.ViewHolder
|
|
|
@@ -31,7 +32,9 @@ import com.adealink.weparty.module.family.util.GenderDisplayUtil
|
|
|
import com.adealink.weparty.module.store.Store
|
|
|
import io.rong.imlib.model.Conversation
|
|
|
import io.rong.imlib.model.MessageContent
|
|
|
+import kotlinx.coroutines.CoroutineScope
|
|
|
import kotlinx.coroutines.Dispatchers
|
|
|
+import kotlinx.coroutines.launch
|
|
|
import kotlinx.coroutines.withContext
|
|
|
import com.adealink.weparty.R as APP_R
|
|
|
|
|
|
@@ -57,18 +60,7 @@ class FamilyInviteMessageItemProvider : BaseMessageItemProvider<FamilyInviteMess
|
|
|
listener: IViewProviderListener<UiMessage>
|
|
|
) {
|
|
|
val familyId = t.familyId ?: return
|
|
|
- /*
|
|
|
- // 判断查询哪个用户的家族加入状态 问题:对方没加入则Null
|
|
|
- val queryUid = if (uiMessage.getMessage().messageDirection == Message.MessageDirection.SEND) {
|
|
|
- // 发送方(邀请者):查询对方(被邀请者)的状态
|
|
|
- uiMessage.targetId?.toLongOrNull() ?: return
|
|
|
- } else {
|
|
|
- // 接收方(被邀请者):查询自己的状态
|
|
|
- ProfileModule.getMyUid()
|
|
|
- }
|
|
|
- */
|
|
|
-
|
|
|
- holder.launch(Dispatchers.IO) {
|
|
|
+ holder.launch(Dispatcher.WENEXT_THREAD_POOL) {
|
|
|
try {
|
|
|
val result = FamilyModule.getFamilyDetail(familyId)
|
|
|
withContext(Dispatchers.Main) {
|