Don't mark messages as read if conversation view isn't 100% visible.

This commit is contained in:
Matthew Chen 2018-05-17 10:52:15 -04:00
parent 18f3bf535a
commit 78de7a10f7

View file

@ -3798,12 +3798,13 @@ typedef enum : NSUInteger {
- (void)markVisibleMessagesAsRead
{
// TODO: Make sure that we're still marking messages as read when we leave this VC.
if (self.presentedViewController) {
OWSFail(@"%@ Not marking messages as read; another view is presented.", self.logTag);
DDLogInfo(@"%@ Not marking messages as read; another view is presented.", self.logTag);
return;
}
if (self.navigationController.topViewController != self) {
OWSFail(@"%@ Not marking messages as read; another view is pushed.", self.logTag);
DDLogInfo(@"%@ Not marking messages as read; another view is pushed.", self.logTag);
return;
}