Addressing UI issues.

- Makes sure that status bar is white on launch.
- Dismisses keyboard before playing video.
pull/1/head
Frederic Jacobs 10 years ago
parent 1bbfbd4281
commit 1d1a140d6b

@ -304,6 +304,7 @@ static NSString* const kCallSegue = @"2.0_6.0_Call_Segue";
}
-(void)setupAppearance {
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
[[UINavigationBar appearance] setBarTintColor:[UIColor ows_materialBlueColor]];
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];

@ -759,7 +759,7 @@ typedef enum : NSUInteger {
if ([attachment isKindOfClass:[TSAttachmentStream class]]) {
TSAttachmentStream *attStream = (TSAttachmentStream*)attachment;
FullImageViewController * vc = [[FullImageViewController alloc] initWithAttachment:attStream fromRect:convertedRect forInteraction:[self interactionAtIndexPath:indexPath]];
[vc presentFromViewController:self.navigationController];
}
} else {
@ -781,6 +781,7 @@ typedef enum : NSUInteger {
NSFileManager *fileManager = [NSFileManager defaultManager];
if([messageMedia isVideo]) {
if ([fileManager fileExistsAtPath:[attStream.mediaURL path]]) {
[self dismissKeyBoard];
_videoPlayer = [[MPMoviePlayerController alloc] initWithContentURL:attStream.mediaURL];
[_videoPlayer prepareToPlay];
@ -953,7 +954,7 @@ typedef enum : NSUInteger {
#pragma mark Bubble User Actions
- (void)handleUnsentMessageTap:(TSOutgoingMessage*)message{
[self.inputToolbar.contentView.textView resignFirstResponder];
[self dismissKeyBoard];
[DJWActionSheet showInView:self.parentViewController.view withTitle:nil cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Delete" otherButtonTitles:@[@"Send again"] tapBlock:^(DJWActionSheet *actionSheet, NSInteger tappedButtonIndex) {
if (tappedButtonIndex == actionSheet.cancelButtonIndex) {
NSLog(@"User Cancelled");
@ -983,7 +984,7 @@ typedef enum : NSUInteger {
NSString *messageString = [NSString stringWithFormat:@"Do you want to accept %@'s new identity key: %@", _thread.name, newKeyFingerprint];
NSArray *actions = @[@"Accept new identity key", @"Copy new identity key to pasteboard"];
[self.inputToolbar.contentView.textView resignFirstResponder];
[self dismissKeyBoard];
[DJWActionSheet showInView:self.parentViewController.view withTitle:messageString cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Delete" otherButtonTitles:actions tapBlock:^(DJWActionSheet *actionSheet, NSInteger tappedButtonIndex) {
if (tappedButtonIndex == actionSheet.cancelButtonIndex) {
@ -1406,7 +1407,7 @@ typedef enum : NSUInteger {
-(void)didPressAccessoryButton:(UIButton *)sender
{
[self.inputToolbar.contentView.textView resignFirstResponder];
[self dismissKeyBoard];
UIView *presenter = self.parentViewController.view;
@ -1517,7 +1518,7 @@ typedef enum : NSUInteger {
}
- (IBAction)unwindGroupUpdated:(UIStoryboardSegue *)segue{
[self.inputToolbar.contentView.textView resignFirstResponder];
[self dismissKeyBoard];
NewGroupViewController *ngc = [segue sourceViewController];
TSGroupModel* newGroupModel = [ngc groupModel];
NSMutableArray* groupMemberIds = [[NSMutableArray alloc] initWithArray:newGroupModel.groupMemberIds];
@ -1526,6 +1527,10 @@ typedef enum : NSUInteger {
[self updateGroupModelTo:newGroupModel];
}
- (void)dismissKeyBoard {
[self.inputToolbar.contentView.textView resignFirstResponder];
}
- (void)dealloc{
[[NSNotificationCenter defaultCenter] removeObserver:self];
}

Loading…
Cancel
Save