Merge branch 'server-operators' into dc/android-desktop-server-operators

This commit is contained in:
Diogo
2024-11-20 21:52:36 +00:00
28 changed files with 1575 additions and 395 deletions
@@ -15,6 +15,7 @@ import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.platform.LocalView
import chat.simplex.common.AppScreen
import chat.simplex.common.model.clear
import chat.simplex.common.model.clearAndNotify
import chat.simplex.common.views.helpers.*
import androidx.compose.ui.platform.LocalContext as LocalContext1
import chat.simplex.res.MR
@@ -75,7 +76,7 @@ actual class GlobalExceptionsHandler: Thread.UncaughtExceptionHandler {
} else if (chatModel.chatId.value != null) {
// Since no modals are open, the problem is probably in ChatView
chatModel.chatId.value = null
chatModel.chatItems.clear()
chatModel.chatItems.clearAndNotify()
} else {
// ChatList, nothing to do. Maybe to show other view except ChatList
}
@@ -44,3 +44,10 @@ actual fun LocalWindowWidth(): Dp {
(rect.width() / density).dp
}
}
@Composable
actual fun LocalWindowHeight(): Dp {
val view = LocalView.current
val density = LocalDensity.current
return with(density) { view.height.toDp() }
}