Page MenuHomePhabricator

D13766.diff
No OneTemporary

D13766.diff

diff --git a/lib/shared/dm-ops/dm-op-utils.js b/lib/shared/dm-ops/dm-op-utils.js
--- a/lib/shared/dm-ops/dm-op-utils.js
+++ b/lib/shared/dm-ops/dm-op-utils.js
@@ -459,16 +459,15 @@
const time = Math.max(messagesFromOtherPeers.map(message => message.time));
invariant(threadInfo.thick, 'Thread should be thick');
- // We aren't checking if the unread timestamp is lower than the time.
- // We're doing this because we want to flip the thread to unread after
- // any new message from a non-viewer.
- newUpdateInfos.push({
- type: updateTypes.UPDATE_THREAD_READ_STATUS,
- id: uuid.v4(),
- time,
- threadID: threadInfo.id,
- unread: true,
- });
+ if (threadInfo.timestamps.currentUser.unread < time) {
+ newUpdateInfos.push({
+ type: updateTypes.UPDATE_THREAD_READ_STATUS,
+ id: uuid.v4(),
+ time,
+ threadID: threadInfo.id,
+ unread: true,
+ });
+ }
}
return newUpdateInfos;

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 22, 7:49 PM (17 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2564480
Default Alt Text
D13766.diff (985 B)

Event Timeline