Fix incoming request screen not appearing automatically when using the offline version of the app

This commit is contained in:
greenart7c3
2025-02-24 19:25:20 -03:00
parent 031d686466
commit 094bda299a
@@ -567,26 +567,18 @@ fun MainScreen(
}
var localRoute by remember { mutableStateOf(route.value ?: if (intents.isEmpty()) Route.Applications.route else Route.IncomingRequest.route) }
@Suppress("KotlinConstantConditions")
if (BuildConfig.FLAVOR != "offline") {
LaunchedEffect(Unit, route.value, intents) {
launch(Dispatchers.Main) {
if (route.value != null) {
localRoute = route.value!!
route.value = null
} else {
localRoute = if (intents.isEmpty()) Route.Applications.route else Route.IncomingRequest.route
}
LaunchedEffect(Unit, route.value, intents) {
launch(Dispatchers.Main) {
if (route.value != null) {
localRoute = route.value!!
route.value = null
} else {
localRoute = if (intents.isEmpty()) Route.Applications.route else Route.IncomingRequest.route
}
}
}
val items = mutableListOf(Route.Applications, Route.IncomingRequest, Route.Settings, Route.Accounts)
@Suppress("KotlinConstantConditions")
if (BuildConfig.FLAVOR == "offline") {
items.remove(Route.ActiveRelays)
}
var shouldShowBottomSheet by remember { mutableStateOf(false) }
val sheetState =