mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 15:26:15 +00:00
Fix: ensure the effect is restarted on each sync update.
This commit is contained in:
+2
-2
@@ -155,7 +155,7 @@ class MessagesPresenter @AssistedInject constructor(
|
|||||||
mutableStateOf(false)
|
mutableStateOf(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
LaunchedEffect(syncUpdateFlow) {
|
LaunchedEffect(syncUpdateFlow.value) {
|
||||||
withContext(dispatchers.io) {
|
withContext(dispatchers.io) {
|
||||||
canJoinCall = room.canUserJoinCall(room.sessionId).getOrDefault(false)
|
canJoinCall = room.canUserJoinCall(room.sessionId).getOrDefault(false)
|
||||||
}
|
}
|
||||||
@@ -163,7 +163,7 @@ class MessagesPresenter @AssistedInject constructor(
|
|||||||
|
|
||||||
val inviteProgress = remember { mutableStateOf<AsyncData<Unit>>(AsyncData.Uninitialized) }
|
val inviteProgress = remember { mutableStateOf<AsyncData<Unit>>(AsyncData.Uninitialized) }
|
||||||
var showReinvitePrompt by remember { mutableStateOf(false) }
|
var showReinvitePrompt by remember { mutableStateOf(false) }
|
||||||
LaunchedEffect(hasDismissedInviteDialog, composerState.hasFocus, syncUpdateFlow) {
|
LaunchedEffect(hasDismissedInviteDialog, composerState.hasFocus, syncUpdateFlow.value) {
|
||||||
withContext(dispatchers.io) {
|
withContext(dispatchers.io) {
|
||||||
showReinvitePrompt = !hasDismissedInviteDialog && composerState.hasFocus && room.isDirect && room.activeMemberCount == 1L
|
showReinvitePrompt = !hasDismissedInviteDialog && composerState.hasFocus && room.isDirect && room.activeMemberCount == 1L
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user