Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios

This commit is contained in:
Ilya Laktyushin
2020-10-09 15:17:24 +04:00
18 changed files with 260 additions and 22 deletions

View File

@@ -3072,6 +3072,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
}
})
var wasInForeground = true
self.applicationInForegroundDisposable = (context.sharedContext.applicationBindings.applicationInForeground
|> distinctUntilChanged
|> deliverOn(Queue.mainQueue())).start(next: { [weak self] value in
@@ -3081,7 +3082,12 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
strongSelf.raiseToListen?.applicationResignedActive()
strongSelf.stopMediaRecorder()
} else {
if !wasInForeground {
strongSelf.chatDisplayNode.recursivelyEnsureDisplaySynchronously(true)
}
}
wasInForeground = value
}
})