From 094bda299ae7bc16356c2995cfd10fe4647740b0 Mon Sep 17 00:00:00 2001 From: greenart7c3 Date: Mon, 24 Feb 2025 19:25:20 -0300 Subject: [PATCH] Fix incoming request screen not appearing automatically when using the offline version of the app --- .../greenart7c3/nostrsigner/ui/MainScreen.kt | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/app/src/main/java/com/greenart7c3/nostrsigner/ui/MainScreen.kt b/app/src/main/java/com/greenart7c3/nostrsigner/ui/MainScreen.kt index 6faaac8b..3560c51d 100644 --- a/app/src/main/java/com/greenart7c3/nostrsigner/ui/MainScreen.kt +++ b/app/src/main/java/com/greenart7c3/nostrsigner/ui/MainScreen.kt @@ -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 =