Skip to content

Commit

Permalink
When you realize there's more than one cancel button
Browse files Browse the repository at this point in the history
  • Loading branch information
TellowKrinkle committed Jan 19, 2018
1 parent 3afc191 commit 21a716d
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions Riot/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -2919,7 +2919,7 @@ - (void)enableInAppNotificationsForAccount:(MXKAccount*)account
preferredStyle:UIAlertControllerStyleAlert];

[self.mxInAppNotification addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]
style:UIAlertActionStyleDefault
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {

if (weakSelf)
Expand Down Expand Up @@ -3002,7 +3002,7 @@ - (void)selectMatrixAccount:(void (^)(MXKAccount *selectedAccount))onSelection
}

[accountPicker addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]
style:UIAlertActionStyleDefault
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {

if (weakSelf)
Expand Down
2 changes: 1 addition & 1 deletion Riot/ViewController/RecentsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1709,7 +1709,7 @@ - (void)joinARoom
}];

[currentAlert addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]
style:UIAlertActionStyleDefault
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {

if (weakSelf)
Expand Down
8 changes: 4 additions & 4 deletions Riot/ViewController/RoomParticipantsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1358,7 +1358,7 @@ - (void)onDeleteAt:(NSIndexPath*)path
preferredStyle:UIAlertControllerStyleAlert];

[currentAlert addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]
style:UIAlertActionStyleDefault
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {

if (weakSelf)
Expand Down Expand Up @@ -1445,7 +1445,7 @@ - (void)onDeleteAt:(NSIndexPath*)path
preferredStyle:UIAlertControllerStyleAlert];

[currentAlert addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]
style:UIAlertActionStyleDefault
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {

if (weakSelf)
Expand Down Expand Up @@ -1497,7 +1497,7 @@ - (void)onDeleteAt:(NSIndexPath*)path
preferredStyle:UIAlertControllerStyleAlert];

[currentAlert addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]
style:UIAlertActionStyleDefault
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {

if (weakSelf)
Expand Down Expand Up @@ -1535,7 +1535,7 @@ - (void)didSelectInvitableContact:(MXKContact*)contact
preferredStyle:UIAlertControllerStyleAlert];

[currentAlert addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]
style:UIAlertActionStyleDefault
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {

if (weakSelf)
Expand Down
14 changes: 7 additions & 7 deletions Riot/ViewController/RoomSettingsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ - (void)promptUserToCopyRoomId:(UILabel*)roomIdLabel
}]];

[currentAlert addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]
style:UIAlertActionStyleDefault
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {

if (weakSelf)
Expand Down Expand Up @@ -781,7 +781,7 @@ - (void)promptUserOnSelectedRoomAlias:(UILabel*)roomAliasLabel
}

[currentAlert addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]
style:UIAlertActionStyleDefault
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {

if (weakSelf)
Expand Down Expand Up @@ -1069,7 +1069,7 @@ - (void)onSaveFailed:(NSString*)message withKey:(NSString*)key
currentAlert = [UIAlertController alertControllerWithTitle:nil message:message preferredStyle:UIAlertControllerStyleAlert];

[currentAlert addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]
style:UIAlertActionStyleDefault
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {

if (weakSelf)
Expand Down Expand Up @@ -2914,7 +2914,7 @@ - (void)shouldChangeHistoryVisibility:(MXRoomHistoryVisibility)historyVisibility
currentAlert = [UIAlertController alertControllerWithTitle:NSLocalizedStringFromTable(@"room_details_history_section_prompt_title", @"Vector", nil) message:NSLocalizedStringFromTable(@"room_details_history_section_prompt_msg", @"Vector", nil) preferredStyle:UIAlertControllerStyleAlert];

[currentAlert addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]
style:UIAlertActionStyleDefault
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {

if (weakSelf)
Expand Down Expand Up @@ -2982,7 +2982,7 @@ - (void)shouldRemoveCanonicalAlias:(void (^)())didRemoveCanonicalAlias
currentAlert = [UIAlertController alertControllerWithTitle:NSLocalizedStringFromTable(@"room_details_addresses_disable_main_address_prompt_title", @"Vector", nil) message:NSLocalizedStringFromTable(@"room_details_addresses_disable_main_address_prompt_msg", @"Vector", nil) preferredStyle:UIAlertControllerStyleAlert];

[currentAlert addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]
style:UIAlertActionStyleDefault
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {

if (weakSelf)
Expand Down Expand Up @@ -3086,7 +3086,7 @@ - (void)onLeave:(id)sender
preferredStyle:UIAlertControllerStyleAlert];

[currentAlert addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]
style:UIAlertActionStyleDefault
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {

if (weakSelf)
Expand Down Expand Up @@ -3181,7 +3181,7 @@ - (void)toggleEncryption:(UISwitch*)theSwitch
preferredStyle:UIAlertControllerStyleAlert];

[currentAlert addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]
style:UIAlertActionStyleDefault
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {

if (weakSelf)
Expand Down
8 changes: 4 additions & 4 deletions Riot/ViewController/RoomViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -2411,7 +2411,7 @@ - (void)showEditButtonAlertMenuForEvent:(MXEvent*)selectedEvent inCell:(id<MXKCe

}]];

[self->currentAlert addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
[self->currentAlert addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"] style:UIAlertActionStyleCancel handler:^(UIAlertAction * action) {

if (weakSelf)
{
Expand Down Expand Up @@ -2466,7 +2466,7 @@ - (void)showEditButtonAlertMenuForEvent:(MXEvent*)selectedEvent inCell:(id<MXKCe
}

[currentAlert addAction:[UIAlertAction actionWithTitle:NSLocalizedStringFromTable(@"cancel", @"Vector", nil)
style:UIAlertActionStyleDefault
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {

if (weakSelf)
Expand Down Expand Up @@ -3918,7 +3918,7 @@ -(BOOL)checkUnsentMessages
}]];

[currentAlert addAction:[UIAlertAction actionWithTitle:NSLocalizedStringFromTable(@"cancel", @"Vector", nil)
style:UIAlertActionStyleDefault
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {

if (weakSelf)
Expand Down Expand Up @@ -4282,7 +4282,7 @@ - (void)contactsTableViewController:(ContactsTableViewController *)contactsTable
preferredStyle:UIAlertControllerStyleAlert];

[currentAlert addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]
style:UIAlertActionStyleDefault
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {

if (weakSelf)
Expand Down
8 changes: 4 additions & 4 deletions Riot/ViewController/SettingsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -2558,7 +2558,7 @@ - (void)onSignout:(id)sender
}]];

[currentAlert addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]
style:UIAlertActionStyleDefault
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {

if (weakSelf)
Expand Down Expand Up @@ -2625,7 +2625,7 @@ - (void)onRemove3PID:(NSIndexPath*)path
currentAlert = [UIAlertController alertControllerWithTitle:NSLocalizedStringFromTable(@"settings_remove_prompt_title", @"Vector", nil) message:promptMsg preferredStyle:UIAlertControllerStyleAlert];

[currentAlert addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]
style:UIAlertActionStyleDefault
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {

if (weakSelf)
Expand Down Expand Up @@ -3616,7 +3616,7 @@ - (void)showThemePicker

// Cancel button
[themePicker addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]
style:UIAlertActionStyleDefault
style:UIAlertActionStyleCancel
handler:nil]];

UIView *fromCell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:USER_INTERFACE_THEME_INDEX inSection:SETTINGS_SECTION_USER_INTERFACE_INDEX]];
Expand Down Expand Up @@ -3848,7 +3848,7 @@ - (void)displayPasswordAlert
// check if the textfields have the right value
savePasswordAction.enabled = NO;

UIAlertAction* cancel = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
UIAlertAction* cancel = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction * action) {

if (weakSelf)
{
Expand Down
2 changes: 1 addition & 1 deletion Riot/Views/RoomInputToolbar/RoomInputToolbarView.m
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ - (IBAction)onTouchUpInside:(UIButton*)button
}]];

[callActionSheet addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]
style:UIAlertActionStyleDefault
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {

if (weakSelf)
Expand Down
2 changes: 1 addition & 1 deletion RiotShareExtension/Model/ShareExtensionManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ - (UIAlertController *)compressionPromptForImage:(NSData *)imageData shareBlock:
}

[compressionPrompt addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]
style:UIAlertActionStyleDefault
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {

if (weakSelf)
Expand Down

0 comments on commit 21a716d

Please sign in to comment.