mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-05 19:08: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,
|
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,
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user