mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-05 23:47:44 +02:00
Enhancement: Improve room creation process
#529 Prompt user to let him choose betwwen: - Start chat by selecting people or - Create a new empty room
This commit is contained in:
@@ -936,6 +936,41 @@
|
||||
}
|
||||
|
||||
- (void)onNewRoomPressed
|
||||
{
|
||||
__weak typeof(self) weakSelf = self;
|
||||
|
||||
[currentAlert dismiss:NO];
|
||||
|
||||
currentAlert = [[MXKAlert alloc] initWithTitle:nil message:nil style:MXKAlertStyleActionSheet];
|
||||
|
||||
[currentAlert addActionWithTitle:NSLocalizedStringFromTable(@"room_recents_start_chat_with", @"Vector", nil) style:MXKAlertActionStyleDefault handler:^(MXKAlert *alert) {
|
||||
|
||||
__strong __typeof(weakSelf)strongSelf = weakSelf;
|
||||
strongSelf->currentAlert = nil;
|
||||
|
||||
[strongSelf performSegueWithIdentifier:@"presentStartChat" sender:strongSelf];
|
||||
}];
|
||||
|
||||
[currentAlert addActionWithTitle:NSLocalizedStringFromTable(@"room_recents_create_empty_room", @"Vector", nil) style:MXKAlertActionStyleDefault handler:^(MXKAlert *alert) {
|
||||
|
||||
__strong __typeof(weakSelf)strongSelf = weakSelf;
|
||||
strongSelf->currentAlert = nil;
|
||||
|
||||
[strongSelf createEmptyRoom];
|
||||
}];
|
||||
|
||||
currentAlert.cancelButtonIndex = [currentAlert addActionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"] style:MXKAlertActionStyleCancel handler:^(MXKAlert *alert) {
|
||||
|
||||
__strong __typeof(weakSelf)strongSelf = weakSelf;
|
||||
strongSelf->currentAlert = nil;
|
||||
}];
|
||||
|
||||
currentAlert.sourceView = createNewRoomImageView;
|
||||
|
||||
[currentAlert showInViewController:self];
|
||||
}
|
||||
|
||||
- (void)createEmptyRoom
|
||||
{
|
||||
// Sanity check
|
||||
if (self.mainSession)
|
||||
|
||||
Reference in New Issue
Block a user