cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject [5/7] cordova-plugin-statusbar git commit: CB-10158 (ios) fix StatusBar issue when recovering from fullscreen video
Date Thu, 08 Dec 2016 00:57:30 GMT
CB-10158 (ios) fix StatusBar issue when recovering from fullscreen video

 This closes #70


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/commit/b7dc5ef7
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/tree/b7dc5ef7
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/diff/b7dc5ef7

Branch: refs/heads/2.2.x
Commit: b7dc5ef7cbc474b0f26f3c66b8a6abfbf953efd4
Parents: 086234b
Author: Julio Cesar Sanchez Hernandez <jcesarmobile@gmail.com>
Authored: Sun Oct 30 15:37:58 2016 +0100
Committer: Julio C├ęsar <jcesarmobile@gmail.com>
Committed: Sun Oct 30 17:48:37 2016 +0100

----------------------------------------------------------------------
 src/ios/CDVStatusBar.m | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/blob/b7dc5ef7/src/ios/CDVStatusBar.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVStatusBar.m b/src/ios/CDVStatusBar.m
index 55f7ed6..f563e49 100644
--- a/src/ios/CDVStatusBar.m
+++ b/src/ios/CDVStatusBar.m
@@ -473,16 +473,16 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
         CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame;
         statusBarFrame = [self invertFrameIfNeeded:statusBarFrame];
         CGRect frame = self.webView.frame;
+        CGFloat height = statusBarFrame.size.height;
 
         if (!self.statusBarOverlaysWebView) {
-            frame.origin.y = statusBarFrame.size.height;
-            frame.size.height -= statusBarFrame.size.height;
+            // CB-10158 If a full screen video is playing the status bar height will be 0,
set it to 20
+            frame.origin.y = height > 0 ? height: 20;
         } else {
-            // even if overlay is used, we want to handle in-call/recording/hotspot larger
status bar
-            CGFloat height = statusBarFrame.size.height;
+            // Even if overlay is used, we want to handle in-call/recording/hotspot larger
status bar
             frame.origin.y = height >= 20 ? height - 20 : 0;
-            frame.size.height -= frame.origin.y;
         }
+        frame.size.height -= frame.origin.y;
         self.webView.frame = frame;
     } else {
         CGRect bounds = [[UIScreen mainScreen] applicationFrame];


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message