Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F2871956
D13576.id44837.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D13576.id44837.diff
View Options
diff --git a/lib/reducers/thread-reducer.js b/lib/reducers/thread-reducer.js
--- a/lib/reducers/thread-reducer.js
+++ b/lib/reducers/thread-reducer.js
@@ -335,8 +335,38 @@
const changedThreadInfos: { [string]: RawThreadInfo } = {};
for (const [threadID, mostRecentTime] of threadIDToMostRecentTime) {
const threadInfo = state.threadInfos[threadID];
+ if (!threadInfo) {
+ continue;
+ }
+
+ if (threadInfo.thick) {
+ if (threadInfo.timestamps.currentUser.unread > mostRecentTime) {
+ continue;
+ }
+ changedThreadInfos[threadID] = {
+ ...threadInfo,
+ timestamps: {
+ ...threadInfo.timestamps,
+ currentUser: {
+ ...threadInfo.timestamps.currentUser,
+ unread: mostRecentTime,
+ },
+ },
+ };
+ if (!threadInfo.currentUser.unread) {
+ changedThreadInfos[threadID] = {
+ ...changedThreadInfos[threadID],
+ currentUser: {
+ ...threadInfo.currentUser,
+ unread: true,
+ },
+ };
+ }
+ continue;
+ }
+
if (
- !threadInfo ||
+ !action.payload.updatesCurrentAsOf ||
threadInfo.currentUser.unread ||
action.payload.updatesCurrentAsOf > mostRecentTime
) {
diff --git a/lib/types/message-types.js b/lib/types/message-types.js
--- a/lib/types/message-types.js
+++ b/lib/types/message-types.js
@@ -669,7 +669,7 @@
export type SaveMessagesPayload = {
+rawMessageInfos: $ReadOnlyArray<RawMessageInfo>,
- +updatesCurrentAsOf: number,
+ +updatesCurrentAsOf: ?number,
};
export type NewMessagesPayload = {
diff --git a/native/push/push-handler.react.js b/native/push/push-handler.react.js
--- a/native/push/push-handler.react.js
+++ b/native/push/push-handler.react.js
@@ -668,9 +668,6 @@
for (const keyserverID in keyserverIDToMessageInfos) {
const updatesCurrentAsOf = this.props.allUpdatesCurrentAsOf[keyserverID];
const messageInfos = keyserverIDToMessageInfos[keyserverID];
- if (!updatesCurrentAsOf) {
- continue;
- }
this.props.dispatch({
type: saveMessagesActionType,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 3, 9:29 PM (22 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2223189
Default Alt Text
D13576.id44837.diff (2 KB)
Attached To
Mode
D13576: [lib] fix `PushHandler` to support DMs
Attached
Detach File
Event Timeline
Log In to Comment