From 4546ff40313a33e772b5adb73eecff4d0500ecd1 Mon Sep 17 00:00:00 2001 From: Frank Rotermund Date: Fri, 8 Sep 2023 09:52:48 +0200 Subject: [PATCH] MESSENGER-5130 hotfix maintenance popup on missing server --- CHANGES_BWI.md | 18 +++++++++++++++ Config/AppVersion.xcconfig | 2 +- Config/BWIBuildSettings.swift | 4 ++-- Riot/Assets/new_features.html | 12 ++++++++++ .../AuthenticationServerSelectionScreen.swift | 23 +++++++++++-------- 5 files changed, 47 insertions(+), 12 deletions(-) diff --git a/CHANGES_BWI.md b/CHANGES_BWI.md index 469ce643a..80278a54c 100644 --- a/CHANGES_BWI.md +++ b/CHANGES_BWI.md @@ -1,3 +1,21 @@ +Changes in BWI project 2.9.1 (2023-09-08) +=================================================== + +Upstream merge ✨: + +Features ✨: + +Improvements 🙌: + +Bugfix 🐛: +- Maintenance Popup on server selection (#5130) + +Translations 🗣 : + +SDK API changes ⚠️: + +Build 🧱: + Changes in BWI project 2.9.0 (2023-08-31) =================================================== diff --git a/Config/AppVersion.xcconfig b/Config/AppVersion.xcconfig index 0adc5f432..92b5127ef 100644 --- a/Config/AppVersion.xcconfig +++ b/Config/AppVersion.xcconfig @@ -16,5 +16,5 @@ // // Version -MARKETING_VERSION = 2.9.0 +MARKETING_VERSION = 2.9.1 CURRENT_PROJECT_VERSION = 20220714163152 diff --git a/Config/BWIBuildSettings.swift b/Config/BWIBuildSettings.swift index 9df896f21..55ec0a76a 100644 --- a/Config/BWIBuildSettings.swift +++ b/Config/BWIBuildSettings.swift @@ -201,8 +201,8 @@ class BWIBuildSettings: NSObject { "00136d830dd2acd5047efcf8429e939ef7ef97a84bef1930df86aace3f855265", "64cbbeea37237814445b65c941d010b9d5d024e4c584a476864b00c7c9909bce", "e79f4ce0f3c2772b45fd492a9c12e4e10e869ca21af68f13ff48c9c3bbd446ea", - "5506e467929cc1d2fb348b6887e793ccfc6ecdbb0420853227a3f6db0d9b75a9", - "ca893c8f6f6a40c95cd0174901b2da3b48bfdce4456563ecffd13ee36ac52e81" + "2d582bed323f226a0e18b6b7904c0d28ccc36423833220a7b5fd2854262ab27e", + "c56904235e283557626c327f8033c3b1c654eae86a5e314531e3a6fcb200ff92" ] // use a different badge color if the user was mentioned in a room diff --git a/Riot/Assets/new_features.html b/Riot/Assets/new_features.html index 931f8fb08..a379e5e7d 100644 --- a/Riot/Assets/new_features.html +++ b/Riot/Assets/new_features.html @@ -26,6 +26,18 @@ +
+

+ Version 2.9.1 +

+ +

+ Behobene Bugs +

+

+

Version 2.9.0 diff --git a/RiotSwiftUI/Modules/Authentication/ServerSelection/View/AuthenticationServerSelectionScreen.swift b/RiotSwiftUI/Modules/Authentication/ServerSelection/View/AuthenticationServerSelectionScreen.swift index bda631a83..43fc1d1eb 100644 --- a/RiotSwiftUI/Modules/Authentication/ServerSelection/View/AuthenticationServerSelectionScreen.swift +++ b/RiotSwiftUI/Modules/Authentication/ServerSelection/View/AuthenticationServerSelectionScreen.swift @@ -17,6 +17,10 @@ import SwiftUI import AVKit +enum AuthenticationServerSelectionScreenAlertType { + case showServerMaintenanceInfoMessageAlert, showServerMaintenanceDefaultAlert, showInvalidAppVersionAlert, showDowntimeTimeAlert, showInvalidServerAlert +} + struct AuthenticationServerSelectionScreen: View { // MARK: - Properties @@ -35,7 +39,7 @@ struct AuthenticationServerSelectionScreen: View { // bwi #4976 show maintenance alert @State private var isFetchingDowntime = false @State private var showAlert = false - @State private var activeAlert: OnBoardingSplashScreenAlertType = .showInvalidAppVersionAlert + @State private var activeAlert: AuthenticationServerSelectionScreenAlertType = .showInvalidAppVersionAlert private var textFieldFooterColor: Color { viewModel.viewState.hasValidationError ? theme.colors.alert : theme.colors.tertiaryContent @@ -68,9 +72,7 @@ struct AuthenticationServerSelectionScreen: View { serverForm .alert(item: $viewModel.alertInfo) { $0.alert } - .alert(isPresented: $showAlertForInvalidServer) { - invalidServerAlert() - } + if BWIBuildSettings.shared.authScreenShowTestServerOptions { serverSelectionButton } @@ -153,8 +155,10 @@ struct AuthenticationServerSelectionScreen: View { return Alert(title: Text(BWIL10n.downtimeTitle), message: Text(BWIL10n.downtimeDefaultMessage), dismissButton: .destructive(Text(BWIL10n.downtimeAlertDismissButton)) { - self.submit() - }) + self.submit() + }) + case .showInvalidServerAlert: + return self.invalidServerAlert() } }) @@ -270,7 +274,8 @@ struct AuthenticationServerSelectionScreen: View { if isHomeserverAddressValid(viewModel.homeserverAddress) { viewModel.send(viewAction: .confirm) } else { - showAlertForInvalidServer = true + activeAlert = .showInvalidServerAlert + showAlert = true } } @@ -345,8 +350,8 @@ struct AuthenticationServerSelectionScreen: View { if success { self.showAlertIfNeeded() } else { - showAlert = true - activeAlert = .showServerMaintenanceDefaultAlert + // hotfix 2.9.1 if request ist no successful there probably is no maintenance on server -> don't show popup + self.submit() } } }