Only show close app button on external requests

The close app button on the empty incoming requests screen is only
useful when the screen is shown from SignerActivity. Hide it in the
main activity to avoid offering a confusing way to terminate the app
while browsing applications/settings.
This commit is contained in:
Claude
2026-05-18 19:46:07 +00:00
parent da152f5125
commit 1e1ac440f5
2 changed files with 11 additions and 7 deletions
@@ -44,6 +44,7 @@ fun IncomingRequestScreen(
account: Account,
onRemoveIntentData: (List<IntentData>, IntentResultType) -> Unit,
onLoading: (Boolean) -> Unit,
isExternalRequest: Boolean = false,
) {
var loading by remember { mutableStateOf(false) }
@@ -66,6 +67,7 @@ fun IncomingRequestScreen(
stringResource(R.string.why_not_explore_your_favorite_nostr_app_a_bit),
textAlign = TextAlign.Center,
)
if (isExternalRequest) {
Spacer(Modifier.size(16.dp))
OutlinedButton(
onClick = {
@@ -75,6 +77,7 @@ fun IncomingRequestScreen(
Text(stringResource(R.string.invalid_intent_close_app))
}
}
}
} else if (intents.size == 1) {
IntentSingleEventHomeScreen(
horizontalPadding = horizontalPadding,
@@ -399,6 +399,7 @@ fun MainScreen(
onLoading = {
isLoading = it
},
isExternalRequest = isExternalRequest,
)
},
)