mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 15:09:31 +02:00
Show a helpful dialog on bad username / password (the old dialog didn't work because showAsAlert tries to show it in the tab controller which isn't visible, plus it only said 'M_FORBIDDEN' anyway).
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
#import "MatrixHandler.h"
|
||||
#import "AppDelegate.h"
|
||||
#import "CustomAlert.h"
|
||||
|
||||
NSString* const defaultHomeserver = @"http://matrix.org";
|
||||
|
||||
@@ -212,7 +213,9 @@ NSString* const defaultHomeserver = @"http://matrix.org";
|
||||
|
||||
NSLog(@"Login failed: %@", error);
|
||||
//Alert user
|
||||
[[AppDelegate theDelegate] showErrorAsAlert:error];
|
||||
CustomAlert *alert = [[CustomAlert alloc] initWithTitle:@"Login Failed" message:@"Invalid username/password" style:CustomAlertStyleAlert];
|
||||
[alert addActionWithTitle:@"Dismiss" style:CustomAlertActionStyleCancel handler:^(CustomAlert *alert) {}];
|
||||
[alert showInViewController:self];
|
||||
}];
|
||||
}
|
||||
} else if (sender == _createAccountBtn){
|
||||
|
||||
Reference in New Issue
Block a user