diff --git a/src/global/actions/api/sync.ts b/src/global/actions/api/sync.ts index 0958c6b06..5a8c15202 100644 --- a/src/global/actions/api/sync.ts +++ b/src/global/actions/api/sync.ts @@ -16,7 +16,7 @@ import { safeReplaceViewportIds, updateChats, updateListedIds, - updateThread, + updateThread, updateThreadInfo, updateThreadInfos, updateUsers, } from '../../reducers'; @@ -161,6 +161,9 @@ async function loadAndReplaceMessages(global: T, actions: global = addChatMessagesById(global, currentChatId, byId); global = updateListedIds(global, currentChatId, activeThreadId, listedIds); + if (threadInfo?.originChannelId) { + global = updateThreadInfo(global, currentChatId, activeThreadId, threadInfo); + } // eslint-disable-next-line @typescript-eslint/no-loop-func Object.values(global.byTabId).forEach(({ id: otherTabId }) => { const { chatId: otherChatId, threadId: otherThreadId } = selectCurrentMessageList(global, otherTabId) || {}; diff --git a/src/global/init.ts b/src/global/init.ts index 4c3b2e33a..743a63945 100644 --- a/src/global/init.ts +++ b/src/global/init.ts @@ -15,7 +15,6 @@ import { Bundles, loadBundle } from '../util/moduleLoader'; import { getCurrentTabId, reestablishMasterToSelf } from '../util/establishMultitabRole'; import { updateTabState } from './reducers/tabs'; import type { ActionReturnType, GlobalState } from './types'; -import { getIsMobile } from '../hooks/useAppLayout'; import { isLocalMessageId } from './helpers'; initCache(); @@ -114,7 +113,7 @@ addActionHandler('init', (global, actions, payload): ActionReturnType => { }; }); - const parsedMessageList = !getIsMobile() ? parseLocationHash() : undefined; + const parsedMessageList = parseLocationHash(); if (global.authState !== 'authorizationStateReady' && !global.passcode.hasPasscode && !global.passcode.isScreenLocked) {