mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-30 21:26:57 +02:00
Feature/4174 better error message when backend down
This commit is contained in:
@@ -1021,6 +1021,17 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
|
||||
|
||||
- (UIAlertController*)showAlertWithTitle:(NSString*)title message:(NSString*)message
|
||||
{
|
||||
// bwi: (#4174) handling of client errors that are shown when the backend is down
|
||||
if ([title containsString:BWIBuildSettings.shared.clientErrorSearchTerm]) {
|
||||
ServerDowntimeDefaultService *service = [[ServerDowntimeDefaultService alloc] init];
|
||||
|
||||
if ([service isDowntimeNow]) {
|
||||
title = BWIL10n.standardErrorAlertTitleDowntime;
|
||||
} else {
|
||||
title = BWIL10n.standardErrorAlertTitleNoDowntime;
|
||||
}
|
||||
}
|
||||
|
||||
[_errorNotification dismissViewControllerAnimated:NO completion:nil];
|
||||
|
||||
_errorNotification = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
Reference in New Issue
Block a user