Respond to CR.

// FREEBIE
pull/1/head
Matthew Chen 8 years ago
parent e48efe01c9
commit a52771e286

@ -18,7 +18,6 @@
#import "OWSWebRTCDataProtos.pb.h" #import "OWSWebRTCDataProtos.pb.h"
#import "PhoneManager.h" #import "PhoneManager.h"
#import "PropertyListPreferences.h" #import "PropertyListPreferences.h"
#import "PureLayout.h"
#import "PushManager.h" #import "PushManager.h"
#import "RPAccountManager.h" #import "RPAccountManager.h"
#import "TSSocketManager.h" #import "TSSocketManager.h"
@ -27,6 +26,7 @@
#import "UIUtil.h" #import "UIUtil.h"
#import "UIView+OWS.h" #import "UIView+OWS.h"
#import <JSQSystemSoundPlayer.h> #import <JSQSystemSoundPlayer.h>
#import <PureLayout/PureLayout.h>
#import <SignalServiceKit/Contact.h> #import <SignalServiceKit/Contact.h>
#import <SignalServiceKit/ContactsUpdater.h> #import <SignalServiceKit/ContactsUpdater.h>
#import <SignalServiceKit/Cryptography.h> #import <SignalServiceKit/Cryptography.h>

@ -2,7 +2,7 @@
// Copyright (c) 2017 Open Whisper Systems. All rights reserved. // Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// //
#import "PureLayout.h" #import <PureLayout/PureLayout.h>
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
// A convenience method for doing responsive layout. Scales between two // A convenience method for doing responsive layout. Scales between two

@ -195,9 +195,9 @@
#pragma mark - Gesture Recognizers #pragma mark - Gesture Recognizers
- (void)imageDismissGesture:(UIGestureRecognizer *)sender { - (void)imageDismissGesture:(UIGestureRecognizer *)sender {
if (sender.state == UIGestureRecognizerStateRecognized) { if (sender.state == UIGestureRecognizerStateRecognized) {
[self dismiss]; [self dismiss];
} }
} }
- (void)longPressGesture:(UIGestureRecognizer *)sender { - (void)longPressGesture:(UIGestureRecognizer *)sender {

@ -1238,10 +1238,6 @@ typedef enum : NSUInteger {
_videoPlayer = [[MPMoviePlayerController alloc] initWithContentURL:attStream.mediaURL]; _videoPlayer = [[MPMoviePlayerController alloc] initWithContentURL:attStream.mediaURL];
[_videoPlayer prepareToPlay]; [_videoPlayer prepareToPlay];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePlayBackDidFinish:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:_videoPlayer];
[[NSNotificationCenter defaultCenter] addObserver:self [[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePlayerWillExitFullscreen:) selector:@selector(moviePlayerWillExitFullscreen:)
name:MPMoviePlayerWillExitFullscreenNotification name:MPMoviePlayerWillExitFullscreenNotification
@ -1389,16 +1385,18 @@ typedef enum : NSUInteger {
} }
} }
- (void)moviePlayBackDidFinish:(id)sender { // There's more than one way to exit the fullscreen video playback.
DDLogDebug(@"%@ %s", self.tag, __PRETTY_FUNCTION__); // There's a done button, a "toggle fullscreen" button and I think
} // there's some gestures too. These fire slightly different notifications.
// We want to hide & clean up the video player immediately in all of
// these cases.
- (void)moviePlayerWillExitFullscreen:(id)sender { - (void)moviePlayerWillExitFullscreen:(id)sender {
DDLogDebug(@"%@ %s", self.tag, __PRETTY_FUNCTION__); DDLogDebug(@"%@ %s", self.tag, __PRETTY_FUNCTION__);
[self clearVideoPlayer]; [self clearVideoPlayer];
} }
// See comment on moviePlayerWillExitFullscreen:
- (void)moviePlayerDidExitFullscreen:(id)sender { - (void)moviePlayerDidExitFullscreen:(id)sender {
DDLogDebug(@"%@ %s", self.tag, __PRETTY_FUNCTION__); DDLogDebug(@"%@ %s", self.tag, __PRETTY_FUNCTION__);

Loading…
Cancel
Save