Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3339406
D13766.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
985 B
Referenced Files
None
Subscribers
None
D13766.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D13766: [lib] Add timestamp check when flipping unread status
Attached
Detach File
Event Timeline
Log In to Comment