mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-05 10:58:23 +00:00
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:
@@ -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,13 +67,15 @@ fun IncomingRequestScreen(
|
||||
stringResource(R.string.why_not_explore_your_favorite_nostr_app_a_bit),
|
||||
textAlign = TextAlign.Center,
|
||||
)
|
||||
Spacer(Modifier.size(16.dp))
|
||||
OutlinedButton(
|
||||
onClick = {
|
||||
Amber.instance.getMainActivity()?.finishAndRemoveTask()
|
||||
},
|
||||
) {
|
||||
Text(stringResource(R.string.invalid_intent_close_app))
|
||||
if (isExternalRequest) {
|
||||
Spacer(Modifier.size(16.dp))
|
||||
OutlinedButton(
|
||||
onClick = {
|
||||
Amber.instance.getMainActivity()?.finishAndRemoveTask()
|
||||
},
|
||||
) {
|
||||
Text(stringResource(R.string.invalid_intent_close_app))
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (intents.size == 1) {
|
||||
|
||||
@@ -399,6 +399,7 @@ fun MainScreen(
|
||||
onLoading = {
|
||||
isLoading = it
|
||||
},
|
||||
isExternalRequest = isExternalRequest,
|
||||
)
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user