From 3f1e4be3a95e3501b26cadac47e72781474c1d12 Mon Sep 17 00:00:00 2001 From: Adam D Date: Fri, 13 Mar 2015 07:55:00 +1030 Subject: [PATCH] probably better we put that here --- HBTSStatusBarView.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/HBTSStatusBarView.mm b/HBTSStatusBarView.mm index 51641f0..b34f33d 100644 --- a/HBTSStatusBarView.mm +++ b/HBTSStatusBarView.mm @@ -183,6 +183,10 @@ - (void)_updateForCurrentStatusBarStyle { #pragma mark - Show/hide - (void)receivedStatusNotification:(NSNotification *)notification { + if (!self.superview || ![self.superview isKindOfClass:UIStatusBar.class]) { + return; + } + HBTSStatusBarType type = (HBTSStatusBarType)((NSNumber *)notification.userInfo[kHBTSMessageTypeKey]).intValue; BOOL typing = ((NSNumber *)notification.userInfo[kHBTSMessageIsTypingKey]).boolValue; BOOL typingTimeout = ((NSNumber *)notification.userInfo[kHBTSPreferencesTypingTimeoutKey]).boolValue; @@ -218,7 +222,7 @@ - (void)receivedStatusNotification:(NSNotification *)notification { } - (void)showWithTimeout:(NSTimeInterval)timeout { - if ([UIApplication sharedApplication].statusBarHidden || !self.superview || ![self.superview isKindOfClass:UIStatusBar.class]) { + if ([UIApplication sharedApplication].statusBarHidden) { return; }