mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-13 02:53:39 +00:00
SES-2386 Account Creation Modal
This commit is contained in:
parent
4a2f6e7b4e
commit
95ecbe664d
@ -1,5 +1,6 @@
|
|||||||
package org.thoughtcrime.securesms.onboarding
|
package org.thoughtcrime.securesms.onboarding
|
||||||
|
|
||||||
|
import androidx.annotation.StringRes
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
import network.loki.messenger.R
|
import network.loki.messenger.R
|
||||||
@ -11,12 +12,13 @@ import org.thoughtcrime.securesms.ui.color.LocalColors
|
|||||||
@Composable
|
@Composable
|
||||||
fun OnboardingBackPressAlertDialog(
|
fun OnboardingBackPressAlertDialog(
|
||||||
dismissDialog: () -> Unit,
|
dismissDialog: () -> Unit,
|
||||||
|
@StringRes textId: Int = R.string.you_cannot_go_back_further_in_order_to_stop_loading_your_account_session_needs_to_quit,
|
||||||
quit: () -> Unit
|
quit: () -> Unit
|
||||||
) {
|
) {
|
||||||
AlertDialog(
|
AlertDialog(
|
||||||
onDismissRequest = dismissDialog,
|
onDismissRequest = dismissDialog,
|
||||||
title = stringResource(R.string.warning),
|
title = stringResource(R.string.warning),
|
||||||
text = stringResource(R.string.you_cannot_go_back_further_in_order_to_stop_loading_your_account_session_needs_to_quit),
|
text = stringResource(textId),
|
||||||
buttons = listOf(
|
buttons = listOf(
|
||||||
DialogButtonModel(
|
DialogButtonModel(
|
||||||
GetString(stringResource(R.string.quit)),
|
GetString(stringResource(R.string.quit)),
|
||||||
|
@ -58,7 +58,7 @@ internal fun MessageNotificationsScreen(
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.showDialog) OnboardingBackPressAlertDialog(dismissDialog, quit)
|
if (state.showDialog) OnboardingBackPressAlertDialog(dismissDialog, quit = quit)
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
Spacer(Modifier.weight(1f))
|
Spacer(Modifier.weight(1f))
|
||||||
|
@ -40,7 +40,11 @@ internal fun PickDisplayName(
|
|||||||
quit: () -> Unit = {}
|
quit: () -> Unit = {}
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if (state.showDialog) OnboardingBackPressAlertDialog(dismissDialog, quit)
|
if (state.showDialog) OnboardingBackPressAlertDialog(
|
||||||
|
dismissDialog,
|
||||||
|
R.string.you_cannot_go_back_further_cancel_account_creation,
|
||||||
|
quit
|
||||||
|
)
|
||||||
|
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
@ -1140,5 +1140,6 @@
|
|||||||
<string name="AccessibilityId_qr_code">QR code</string>
|
<string name="AccessibilityId_qr_code">QR code</string>
|
||||||
<string name="warning">Warning</string>
|
<string name="warning">Warning</string>
|
||||||
<string name="you_cannot_go_back_further_in_order_to_stop_loading_your_account_session_needs_to_quit">You cannot go back further. In order to stop loading your account, Session needs to quit.</string>
|
<string name="you_cannot_go_back_further_in_order_to_stop_loading_your_account_session_needs_to_quit">You cannot go back further. In order to stop loading your account, Session needs to quit.</string>
|
||||||
|
<string name="you_cannot_go_back_further_cancel_account_creation">You cannot go back further. In order to cancel your account creation, Session needs to quit.</string>
|
||||||
<string name="quit">Quit</string>
|
<string name="quit">Quit</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user