Message List: "No message here yet" after linking to the group discussion channel (#3424)
This commit is contained in:
parent
50ad3fee78
commit
c5152dfb04
@ -2,8 +2,7 @@ import type { RequiredGlobalActions } from '../../index';
|
|||||||
import { addActionHandler, getGlobal, setGlobal } from '../../index';
|
import { addActionHandler, getGlobal, setGlobal } from '../../index';
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
ApiChat,
|
ApiChat, ApiMessage, ApiPollResult, ApiReactions, ApiThreadInfo,
|
||||||
ApiMessage, ApiPollResult, ApiReactions, ApiThreadInfo,
|
|
||||||
} from '../../../api/types';
|
} from '../../../api/types';
|
||||||
import type {
|
import type {
|
||||||
ActiveEmojiInteraction, ActionReturnType, GlobalState, RequiredGlobalState,
|
ActiveEmojiInteraction, ActionReturnType, GlobalState, RequiredGlobalState,
|
||||||
@ -397,9 +396,11 @@ addActionHandler('apiUpdate', (global, actions, update): ActionReturnType => {
|
|||||||
const messagesById = selectChatMessages(global, chatId);
|
const messagesById = selectChatMessages(global, chatId);
|
||||||
|
|
||||||
if (messagesById && !isUserId(chatId)) {
|
if (messagesById && !isUserId(chatId)) {
|
||||||
|
const tabId = getCurrentTabId();
|
||||||
global = deleteChatMessages(global, chatId, Object.keys(messagesById).map(Number));
|
global = deleteChatMessages(global, chatId, Object.keys(messagesById).map(Number));
|
||||||
setGlobal(global);
|
setGlobal(global);
|
||||||
actions.loadFullChat({ chatId, force: true, tabId: getCurrentTabId() });
|
actions.loadFullChat({ chatId, force: true, tabId });
|
||||||
|
actions.loadViewportMessages({ chatId, threadId: MAIN_THREAD_ID, tabId });
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user