fix: Fix Appstore Page on Login and Texts (MESSENGER-7555)

This commit is contained in:
Frank Rotermund
2026-03-19 14:52:20 +01:00
parent 5196518d0a
commit fbb133f4ce

View File

@@ -36,10 +36,8 @@ struct MigrationInfoView: View {
} else {
MigrationInfoViewOne()
.tag(1)
if !username.isEmpty || getUserName != nil {
MigrationInfoViewTwo(username: username, getUserName: getUserName)
MigrationInfoViewTwo(username: username, getUserName: getUserName)
.tag(2)
}
}
}
.id(redrawKey)
@@ -185,7 +183,7 @@ struct MigrationInfoViewOne: View {
Text(BWIL10n.bwiMobileDialogM1MoreText2).bold() +
Text(BWIL10n.bwiMobileDialogM1MoreText3)
} else {
Text(BWIL10n.bwiMobileDialogM3MoreText1) +
Text(BWIL10n.bwiMobileDialogM1MoreText1) +
Text(BWIL10n.bwiMobileDialogM1MoreText2).bold() +
Text(BWIL10n.bwiMobileDialogM1MoreText3)
}
@@ -298,38 +296,51 @@ struct MigrationInfoViewTwo: View {
.padding(.bottom, 20)
}
VStack(alignment: .leading) {
HStack() {
Text("1.")
Button(action: {
UIPasteboard.general.string = lazyLoadedUserName ?? ""
guard !showSuccessToast else { return }
withAnimation {
showSuccessToast = true
VStack(alignment: .leading) {
HStack() {
if lazyLoadedUserName != nil {
Text("1.")
Button(action: {
UIPasteboard.general.string = lazyLoadedUserName ?? ""
guard !showSuccessToast else { return }
withAnimation {
showSuccessToast = true
}
DispatchQueue.main.asyncAfter(deadline: .now() + 1.5) {
withAnimation {
showSuccessToast = false
}
}
}, label: {
Text(BWIL10n.bwiMobileDialogMMore2Text1)
.underline()
.foregroundColor(Color(themeService.theme.textPrimaryColor))
Image(systemName: "square.on.square")
.resizable()
.foregroundColor(Color(themeService.theme.textPrimaryColor))
.frame(width: 15, height: 15)
})
}
DispatchQueue.main.asyncAfter(deadline: .now() + 1.5) {
withAnimation {
showSuccessToast = false
}
}
HStack() {
// bwi #7555 I know, but its only legacy
if lazyLoadedUserName != nil {
Text("2.")
} else {
Text("1.")
}
}, label: {
Text(BWIL10n.bwiMobileDialogMMore2Text1)
.underline()
.foregroundColor(Color(themeService.theme.textPrimaryColor))
Image(systemName: "square.on.square")
.resizable()
.foregroundColor(Color(themeService.theme.textPrimaryColor))
.frame(width: 15, height: 15)
})
}
HStack() {
Text("2.")
Text(BWIL10n.bwiMobileDialogMMore2Text2)
}
.padding(.bottom, 1)
HStack() {
Text("3.")
Text(BWIL10n.bwiMobileDialogMMore2Text3)
Text(BWIL10n.bwiMobileDialogMMore2Text2)
}
.padding(.bottom, 1)
HStack() {
if lazyLoadedUserName != nil {
Text("3.")
} else {
Text("2.")
}
Text(BWIL10n.bwiMobileDialogMMore2Text3)
}
}
}
}