Merge pull request #440 from greenart7c3/claude/conditional-close-button-mhUk0

Conditionally hide close button in IncomingRequestScreen for internal requests
This commit is contained in:
greenart7c3
2026-05-18 17:18:14 -03:00
committed by GitHub
2 changed files with 11 additions and 7 deletions
@@ -44,6 +44,7 @@ fun IncomingRequestScreen(
account: Account, account: Account,
onRemoveIntentData: (List<IntentData>, IntentResultType) -> Unit, onRemoveIntentData: (List<IntentData>, IntentResultType) -> Unit,
onLoading: (Boolean) -> Unit, onLoading: (Boolean) -> Unit,
isExternalRequest: Boolean = false,
) { ) {
var loading by remember { mutableStateOf(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), stringResource(R.string.why_not_explore_your_favorite_nostr_app_a_bit),
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
) )
if (isExternalRequest) {
Spacer(Modifier.size(16.dp)) Spacer(Modifier.size(16.dp))
OutlinedButton( OutlinedButton(
onClick = { onClick = {
@@ -75,6 +77,7 @@ fun IncomingRequestScreen(
Text(stringResource(R.string.invalid_intent_close_app)) Text(stringResource(R.string.invalid_intent_close_app))
} }
} }
}
} else if (intents.size == 1) { } else if (intents.size == 1) {
IntentSingleEventHomeScreen( IntentSingleEventHomeScreen(
horizontalPadding = horizontalPadding, horizontalPadding = horizontalPadding,
@@ -399,6 +399,7 @@ fun MainScreen(
onLoading = { onLoading = {
isLoading = it isLoading = it
}, },
isExternalRequest = isExternalRequest,
) )
}, },
) )