Don't mark messages as read when something is covering the chat screen

This commit is contained in:
Ilya Laktyushin
2023-03-23 22:52:31 +04:00
parent 38f6adeda1
commit 5149253333
8 changed files with 54 additions and 21 deletions

View File

@@ -1153,6 +1153,7 @@ public class GalleryController: ViewController, StandalonePresentableController,
let completion = { [weak self] in
if animatedOutNode && animatedOutInterface {
self?.actionInteraction?.updateCanReadHistory(true)
self?._hiddenMedia.set(.single(nil))
self?.presentingViewController?.dismiss(animated: false, completion: nil)
}
@@ -1228,12 +1229,14 @@ public class GalleryController: ViewController, StandalonePresentableController,
return nil
}
self.galleryNode.dismiss = { [weak self] in
self?.actionInteraction?.updateCanReadHistory(true)
self?._hiddenMedia.set(.single(nil))
self?.presentingViewController?.dismiss(animated: false, completion: nil)
}
self.galleryNode.beginCustomDismiss = { [weak self] simpleAnimation in
if let strongSelf = self {
strongSelf.actionInteraction?.updateCanReadHistory(true)
strongSelf._hiddenMedia.set(.single(nil))
let animatedOutNode = !simpleAnimation
@@ -1513,6 +1516,8 @@ public class GalleryController: ViewController, StandalonePresentableController,
}
self.accountInUseDisposable.set(self.context.sharedContext.setAccountUserInterfaceInUse(self.context.account.id))
self.actionInteraction?.updateCanReadHistory(false)
}
override public func didAppearInContextPreview() {