Messages: remove some blocking code from main thread
This commit is contained in:
parent
a2c59d4469
commit
42f0474dd2
1 changed files with 4 additions and 9 deletions
|
|
@ -122,17 +122,12 @@ class MessagesPresenter @AssistedInject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
val inviteProgress = remember { mutableStateOf<Async<Unit>>(Async.Uninitialized) }
|
val inviteProgress = remember { mutableStateOf<Async<Unit>>(Async.Uninitialized) }
|
||||||
|
var showReinvitePrompt by remember { mutableStateOf(false) }
|
||||||
val showReinvitePrompt by remember(
|
LaunchedEffect(hasDismissedInviteDialog, composerState.hasFocus, syncUpdateFlow) {
|
||||||
hasDismissedInviteDialog,
|
withContext(dispatchers.io) {
|
||||||
composerState.hasFocus,
|
showReinvitePrompt = !hasDismissedInviteDialog && composerState.hasFocus && room.isDirect && room.activeMemberCount == 1L
|
||||||
syncUpdateFlow,
|
|
||||||
) {
|
|
||||||
derivedStateOf {
|
|
||||||
!hasDismissedInviteDialog && composerState.hasFocus && room.isDirect && room.activeMemberCount == 1L
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val networkConnectionStatus by networkMonitor.connectivity.collectAsState()
|
val networkConnectionStatus by networkMonitor.connectivity.collectAsState()
|
||||||
|
|
||||||
val snackbarMessage by snackbarDispatcher.collectSnackbarMessageAsState()
|
val snackbarMessage by snackbarDispatcher.collectSnackbarMessageAsState()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue