mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
add guard to avoid redundant show, fix logic in existing guard when
hiding. // FREEBIE
This commit is contained in:
parent
2258e18d34
commit
ffe17a3fcc
1 changed files with 8 additions and 2 deletions
|
@ -330,6 +330,11 @@ const UIWindowLevel UIWindowLevel_ScreenBlocking(void)
|
|||
{
|
||||
OWSAssertIsOnMainThread();
|
||||
|
||||
if (!self.returnToCallWindow.hidden) {
|
||||
return;
|
||||
}
|
||||
|
||||
DDLogInfo(@"%@ showing 'return to call' window.", self.logTag);
|
||||
self.returnToCallWindow.hidden = NO;
|
||||
[self.returnToCallViewController startAnimating];
|
||||
}
|
||||
|
@ -338,10 +343,11 @@ const UIWindowLevel UIWindowLevel_ScreenBlocking(void)
|
|||
{
|
||||
OWSAssertIsOnMainThread();
|
||||
|
||||
if (!self.returnToCallWindow.hidden) {
|
||||
DDLogInfo(@"%@ hiding 'return to call' window.", self.logTag);
|
||||
if (self.returnToCallWindow.hidden) {
|
||||
return;
|
||||
}
|
||||
|
||||
DDLogInfo(@"%@ hiding 'return to call' window.", self.logTag);
|
||||
self.returnToCallWindow.hidden = YES;
|
||||
[self.returnToCallViewController stopAnimating];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue