diff --git a/lib/reducers/message-reducer.test.js b/lib/reducers/message-reducer.test.js --- a/lib/reducers/message-reducer.test.js +++ b/lib/reducers/message-reducer.test.js @@ -288,9 +288,7 @@ payload: { currentUserID: '', drafts: [], - threadStore: { - threadInfos: {}, - }, + threadInfos: {}, messageStoreThreads: [], messages: clientDBMessages, reports: [], 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 @@ -482,7 +482,10 @@ }; } else if (action.type === setClientDBStoreActionType) { return { - threadStore: action.payload.threadStore ?? state, + threadStore: { + ...state, + threadInfos: action.payload.threadInfos ?? state.threadInfos, + }, newThreadInconsistencies: [], threadStoreOperations: [], }; diff --git a/lib/types/redux-types.js b/lib/types/redux-types.js --- a/lib/types/redux-types.js +++ b/lib/types/redux-types.js @@ -108,6 +108,7 @@ ToggleMessagePinResult, RoleModificationPayload, RoleDeletionPayload, + RawThreadInfos, } from './thread-types.js'; import type { ClientUpdatesResultWithUserInfos } from './update-types.js'; import type { CurrentUserInfo, UserStore } from './user-types.js'; @@ -643,7 +644,7 @@ +currentUserID: ?string, +drafts: $ReadOnlyArray, +messages: ?$ReadOnlyArray, - +threadStore: ?ThreadStore, + +threadInfos: ?RawThreadInfos, +messageStoreThreads: ?$ReadOnlyArray, +reports: ?$ReadOnlyArray, }, diff --git a/native/data/sqlite-data-handler.js b/native/data/sqlite-data-handler.js --- a/native/data/sqlite-data-handler.js +++ b/native/data/sqlite-data-handler.js @@ -186,7 +186,7 @@ payload: { drafts, messages, - threadStore: { threadInfos: threadInfosFromDB }, + threadInfos: threadInfosFromDB, currentUserID: currentLoggedInUserID, messageStoreThreads, reports: reportsFromDb,