File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -179,6 +179,7 @@ @implementation LPMessageTemplatesClass {
179179 UIButton *_overlayView;
180180 LPHitView *_closePopupView;
181181 BOOL _webViewNeedsFade;
182+ UIDeviceOrientation _orientation;
182183}
183184
184185#pragma mark Initialization
@@ -739,13 +740,20 @@ - (void)setupPopupLayout:(BOOL)isFullscreen isPushAskToAsk:(BOOL)isPushAskToAsk
739740
740741- (void )orientationDidChange : (NSNotification *)notification
741742{
742- [self updatePopupLayout ];
743-
744- // isStatusBarHidden is not updated synchronously
745- LPActionContext *conteext = _contexts.lastObject ;
746- if ([conteext.actionName isEqualToString: LPMT_INTERSTITIAL_NAME]) {
747- [self performSelector: @selector (updatePopupLayout ) withObject: nil afterDelay: 0 ];
743+ UIDevice *device = notification.object ;
744+ // Bug with iOS, calls orientation did change even without change,
745+ // Check if the orientation is not changed than before.
746+ if (_orientation != device.orientation ) {
747+ _orientation = device.orientation ;
748+ [self updatePopupLayout ];
749+
750+ // isStatusBarHidden is not updated synchronously
751+ LPActionContext *conteext = _contexts.lastObject ;
752+ if ([conteext.actionName isEqualToString: LPMT_INTERSTITIAL_NAME]) {
753+ [self performSelector: @selector (updatePopupLayout ) withObject: nil afterDelay: 0 ];
754+ }
748755 }
756+
749757}
750758
751759- (void )closePopupWithAnimation : (BOOL )animated
You can’t perform that action at this time.
0 commit comments