mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Fix the Setup Recovery flow from the home screen banner. (#3483)
This commit is contained in:
+2
-1
@@ -16,6 +16,7 @@ struct HomeScreenRecoveryKeyConfirmationBanner: View {
|
||||
var title: String { requiresExtraAccountSetup ? L10n.bannerSetUpRecoveryTitle : L10n.confirmRecoveryKeyBannerTitle }
|
||||
var message: String { requiresExtraAccountSetup ? L10n.bannerSetUpRecoveryContent : L10n.confirmRecoveryKeyBannerMessage }
|
||||
var actionTitle: String { requiresExtraAccountSetup ? L10n.bannerSetUpRecoverySubmit : L10n.confirmRecoveryKeyBannerPrimaryButtonTitle }
|
||||
var primaryAction: HomeScreenViewAction { requiresExtraAccountSetup ? .setupRecovery : .confirmRecoveryKey }
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 16) {
|
||||
@@ -56,7 +57,7 @@ struct HomeScreenRecoveryKeyConfirmationBanner: View {
|
||||
var buttons: some View {
|
||||
VStack(spacing: 16) {
|
||||
Button(actionTitle) {
|
||||
context.send(viewAction: .manageRecoveryKey)
|
||||
context.send(viewAction: primaryAction)
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.buttonStyle(.compound(.primary, size: .medium))
|
||||
|
||||
Reference in New Issue
Block a user