mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Don't mark messages as read when something is covering the chat screen
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user