desktop: prevent desktop being locked after the call (#7505)

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
This commit is contained in:
Evgeny
2026-09-30 09:28:58 +01:00
committed by GitHub
co-authored by Evgeny @ SimpleX Chat
parent 485bec5d5d
commit 3d3dd421ff
4 changed files with 7 additions and 3 deletions
@@ -182,9 +182,10 @@ private fun ApplicationScope.AppWindow(closedByError: MutableState<Boolean>) {
}
}
var windowFocused by remember { simplexWindowState.windowFocused }
LaunchedEffect(windowFocused) {
val showCallView = ChatModel.showCallView.value
LaunchedEffect(windowFocused, showCallView) {
val delay = ChatController.appPrefs.laLockDelay.get()
if (!windowFocused && ChatModel.showAuthScreen.value && delay > 0) {
if (!windowFocused && !showCallView && ChatModel.showAuthScreen.value && delay > 0) {
delay(delay * 1000L)
// Trigger auth state check when delay ends (and if it ends)
AppLock.recheckAuthState()