mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-07 14:53:35 +00:00
Improvements for feedback compose view on iPad
When the actionsheet is visible, disable the add image button and remove the first responder from the textview
This commit is contained in:
parent
429af075bc
commit
0f142f0ec5
@ -69,6 +69,8 @@
|
|||||||
|
|
||||||
@implementation BITFeedbackComposeViewController {
|
@implementation BITFeedbackComposeViewController {
|
||||||
BOOL _blockUserDataScreen;
|
BOOL _blockUserDataScreen;
|
||||||
|
|
||||||
|
BOOL _actionSheetVisible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -79,6 +81,7 @@
|
|||||||
if (self) {
|
if (self) {
|
||||||
self.title = BITHockeyLocalizedString(@"HockeyFeedbackComposeTitle");
|
self.title = BITHockeyLocalizedString(@"HockeyFeedbackComposeTitle");
|
||||||
_blockUserDataScreen = NO;
|
_blockUserDataScreen = NO;
|
||||||
|
_actionSheetVisible = NO;
|
||||||
_delegate = nil;
|
_delegate = nil;
|
||||||
_manager = [BITHockeyManager sharedHockeyManager].feedbackManager;
|
_manager = [BITHockeyManager sharedHockeyManager].feedbackManager;
|
||||||
_attachments = [NSMutableArray new];
|
_attachments = [NSMutableArray new];
|
||||||
@ -411,6 +414,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
-(void)addPhotoAction:(id)sender {
|
-(void)addPhotoAction:(id)sender {
|
||||||
|
if (_actionSheetVisible) return;
|
||||||
|
|
||||||
// add photo.
|
// add photo.
|
||||||
UIImagePickerController *pickerController = [[UIImagePickerController alloc] init];
|
UIImagePickerController *pickerController = [[UIImagePickerController alloc] init];
|
||||||
pickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
|
pickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
|
||||||
@ -464,6 +469,11 @@
|
|||||||
otherButtonTitles: BITHockeyLocalizedString(@"HockeyFeedbackComposeAttachmentEdit"), nil];
|
otherButtonTitles: BITHockeyLocalizedString(@"HockeyFeedbackComposeAttachmentEdit"), nil];
|
||||||
|
|
||||||
[actionSheet showFromRect: sender.frame inView: self.attachmentScrollView animated: YES];
|
[actionSheet showFromRect: sender.frame inView: self.attachmentScrollView animated: YES];
|
||||||
|
|
||||||
|
_actionSheetVisible = YES;
|
||||||
|
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
|
||||||
|
[self.textView resignFirstResponder];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -526,6 +536,10 @@
|
|||||||
[self presentViewController:navController animated:YES completion:nil];
|
[self presentViewController:navController animated:YES completion:nil];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_actionSheetVisible = NO;
|
||||||
|
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
|
||||||
|
[self.textView becomeFirstResponder];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user