Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32545408
D10280.1767178184.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D10280.1767178184.diff
View Options
diff --git a/native/redux/redux-setup.js b/native/redux/redux-setup.js
--- a/native/redux/redux-setup.js
+++ b/native/redux/redux-setup.js
@@ -315,33 +315,65 @@
return { state, threadStoreOperations: [] };
}
- const updatedActiveThreadInfo = {
- ...state.threadStore.threadInfos[activeThread],
- currentUser: {
- ...state.threadStore.threadInfos[activeThread].currentUser,
- unread: false,
- },
- };
-
- const threadStoreOperations = [
- {
- type: 'replace',
- payload: {
- id: activeThread,
- threadInfo: updatedActiveThreadInfo,
+ const activeThreadInfo = state.threadStore.threadInfos[activeThread];
+ // TODO (atul): Try to get rid of this ridiculous branching.
+ if (activeThreadInfo.minimallyEncoded) {
+ const updatedActiveThreadInfo = {
+ ...activeThreadInfo,
+ currentUser: {
+ ...activeThreadInfo.currentUser,
+ unread: false,
},
- },
- ];
+ };
- const updatedThreadStore = threadStoreOpsHandlers.processStoreOperations(
- state.threadStore,
- threadStoreOperations,
- );
+ const threadStoreOperations = [
+ {
+ type: 'replace',
+ payload: {
+ id: activeThread,
+ threadInfo: updatedActiveThreadInfo,
+ },
+ },
+ ];
- return {
- state: { ...state, threadStore: updatedThreadStore },
- threadStoreOperations,
- };
+ const updatedThreadStore = threadStoreOpsHandlers.processStoreOperations(
+ state.threadStore,
+ threadStoreOperations,
+ );
+
+ return {
+ state: { ...state, threadStore: updatedThreadStore },
+ threadStoreOperations,
+ };
+ } else {
+ const updatedActiveThreadInfo = {
+ ...activeThreadInfo,
+ currentUser: {
+ ...activeThreadInfo.currentUser,
+ unread: false,
+ },
+ };
+
+ const threadStoreOperations = [
+ {
+ type: 'replace',
+ payload: {
+ id: activeThread,
+ threadInfo: updatedActiveThreadInfo,
+ },
+ },
+ ];
+
+ const updatedThreadStore = threadStoreOpsHandlers.processStoreOperations(
+ state.threadStore,
+ threadStoreOperations,
+ );
+
+ return {
+ state: { ...state, threadStore: updatedThreadStore },
+ threadStoreOperations,
+ };
+ }
}
let appLastBecameInactive = 0;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 31, 10:49 AM (5 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5871860
Default Alt Text
D10280.1767178184.diff (2 KB)
Attached To
Mode
D10280: [native] Add branching to `fixUnreadActiveThread` to support `RawThreadInfos`
Attached
Detach File
Event Timeline
Log In to Comment