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 { -(void)setupAppearance {
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
[[UINavigationBar appearance] setBarTintColor:[UIColor ows_materialBlueColor]]; [[UINavigationBar appearance] setBarTintColor:[UIColor ows_materialBlueColor]];
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]]; [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];

@ -781,6 +781,7 @@ typedef enum : NSUInteger {
NSFileManager *fileManager = [NSFileManager defaultManager]; NSFileManager *fileManager = [NSFileManager defaultManager];
if([messageMedia isVideo]) { if([messageMedia isVideo]) {
if ([fileManager fileExistsAtPath:[attStream.mediaURL path]]) { if ([fileManager fileExistsAtPath:[attStream.mediaURL path]]) {
[self dismissKeyBoard];
_videoPlayer = [[MPMoviePlayerController alloc] initWithContentURL:attStream.mediaURL]; _videoPlayer = [[MPMoviePlayerController alloc] initWithContentURL:attStream.mediaURL];
[_videoPlayer prepareToPlay]; [_videoPlayer prepareToPlay];
@ -953,7 +954,7 @@ typedef enum : NSUInteger {
#pragma mark Bubble User Actions #pragma mark Bubble User Actions
- (void)handleUnsentMessageTap:(TSOutgoingMessage*)message{ - (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) { [DJWActionSheet showInView:self.parentViewController.view withTitle:nil cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Delete" otherButtonTitles:@[@"Send again"] tapBlock:^(DJWActionSheet *actionSheet, NSInteger tappedButtonIndex) {
if (tappedButtonIndex == actionSheet.cancelButtonIndex) { if (tappedButtonIndex == actionSheet.cancelButtonIndex) {
NSLog(@"User Cancelled"); 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]; 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"]; 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) { [DJWActionSheet showInView:self.parentViewController.view withTitle:messageString cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Delete" otherButtonTitles:actions tapBlock:^(DJWActionSheet *actionSheet, NSInteger tappedButtonIndex) {
if (tappedButtonIndex == actionSheet.cancelButtonIndex) { if (tappedButtonIndex == actionSheet.cancelButtonIndex) {
@ -1406,7 +1407,7 @@ typedef enum : NSUInteger {
-(void)didPressAccessoryButton:(UIButton *)sender -(void)didPressAccessoryButton:(UIButton *)sender
{ {
[self.inputToolbar.contentView.textView resignFirstResponder]; [self dismissKeyBoard];
UIView *presenter = self.parentViewController.view; UIView *presenter = self.parentViewController.view;
@ -1517,7 +1518,7 @@ typedef enum : NSUInteger {
} }
- (IBAction)unwindGroupUpdated:(UIStoryboardSegue *)segue{ - (IBAction)unwindGroupUpdated:(UIStoryboardSegue *)segue{
[self.inputToolbar.contentView.textView resignFirstResponder]; [self dismissKeyBoard];
NewGroupViewController *ngc = [segue sourceViewController]; NewGroupViewController *ngc = [segue sourceViewController];
TSGroupModel* newGroupModel = [ngc groupModel]; TSGroupModel* newGroupModel = [ngc groupModel];
NSMutableArray* groupMemberIds = [[NSMutableArray alloc] initWithArray:newGroupModel.groupMemberIds]; NSMutableArray* groupMemberIds = [[NSMutableArray alloc] initWithArray:newGroupModel.groupMemberIds];
@ -1526,6 +1527,10 @@ typedef enum : NSUInteger {
[self updateGroupModelTo:newGroupModel]; [self updateGroupModelTo:newGroupModel];
} }
- (void)dismissKeyBoard {
[self.inputToolbar.contentView.textView resignFirstResponder];
}
- (void)dealloc{ - (void)dealloc{
[[NSNotificationCenter defaultCenter] removeObserver:self]; [[NSNotificationCenter defaultCenter] removeObserver:self];
} }

Loading…
Cancel
Save