mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-02 00:17:02 +00:00
Use AlertView instead of ActionSheet when asking to delete all feedback messages on the iPad
This commit is contained in:
parent
147b5ec621
commit
795381d72f
@ -32,7 +32,7 @@
|
|||||||
#import "BITHockeyBaseViewController.h"
|
#import "BITHockeyBaseViewController.h"
|
||||||
|
|
||||||
|
|
||||||
@interface BITFeedbackListViewController : BITHockeyBaseViewController <UITableViewDelegate, UITableViewDataSource, UIActionSheetDelegate> {
|
@interface BITFeedbackListViewController : BITHockeyBaseViewController <UITableViewDelegate, UITableViewDataSource, UIActionSheetDelegate, UIAlertViewDelegate> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
@ -210,6 +210,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)deleteAllMessagesAction:(id)sender {
|
- (void)deleteAllMessagesAction:(id)sender {
|
||||||
|
if (UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPad) {
|
||||||
UIActionSheet *deleteAction = [[UIActionSheet alloc] initWithTitle:BITHockeyLocalizedString(@"HockeyFeedbackListDeleteAllTitle")
|
UIActionSheet *deleteAction = [[UIActionSheet alloc] initWithTitle:BITHockeyLocalizedString(@"HockeyFeedbackListDeleteAllTitle")
|
||||||
delegate:self
|
delegate:self
|
||||||
cancelButtonTitle:BITHockeyLocalizedString(@"HockeyFeedbackListDeleteAllCancel")
|
cancelButtonTitle:BITHockeyLocalizedString(@"HockeyFeedbackListDeleteAllCancel")
|
||||||
@ -219,6 +220,17 @@
|
|||||||
[deleteAction setActionSheetStyle:UIActionSheetStyleBlackTranslucent];
|
[deleteAction setActionSheetStyle:UIActionSheetStyleBlackTranslucent];
|
||||||
[deleteAction showInView:self.view];
|
[deleteAction showInView:self.view];
|
||||||
[deleteAction release];
|
[deleteAction release];
|
||||||
|
} else {
|
||||||
|
UIAlertView *deleteAction = [[UIAlertView alloc] initWithTitle:BITHockeyLocalizedString(@"HockeyFeedbackListButonDeleteAllMessages")
|
||||||
|
message:BITHockeyLocalizedString(@"HockeyFeedbackListDeleteAllTitle")
|
||||||
|
delegate:self
|
||||||
|
cancelButtonTitle:BITHockeyLocalizedString(@"HockeyFeedbackListDeleteAllCancel")
|
||||||
|
otherButtonTitles:BITHockeyLocalizedString(@"HockeyFeedbackListDeleteAllDelete"), nil];
|
||||||
|
|
||||||
|
[deleteAction show];
|
||||||
|
[deleteAction release];
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -480,6 +492,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#pragma mark - UIAlertViewDelegate
|
||||||
|
|
||||||
|
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex {
|
||||||
|
if (buttonIndex == [alertView firstOtherButtonIndex]) {
|
||||||
|
[self deleteAllMessages];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#pragma mark - UIActionSheetDelegate
|
#pragma mark - UIActionSheetDelegate
|
||||||
|
|
||||||
@ -489,4 +509,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user