[Tests] Fix tests after adding chat stack history
This commit is contained in:
parent
3b01b58b60
commit
8a92fedbd4
@ -4,7 +4,7 @@ import {
|
|||||||
import { ApiMessage, ApiThreadInfo, MAIN_THREAD_ID } from '../../api/types';
|
import { ApiMessage, ApiThreadInfo, MAIN_THREAD_ID } from '../../api/types';
|
||||||
import { FocusDirection } from '../../types';
|
import { FocusDirection } from '../../types';
|
||||||
|
|
||||||
import { MESSAGE_LIST_SLICE, MESSAGE_LIST_VIEWPORT_LIMIT } from '../../config';
|
import { IS_TEST, MESSAGE_LIST_SLICE, MESSAGE_LIST_VIEWPORT_LIMIT } from '../../config';
|
||||||
import {
|
import {
|
||||||
selectListedIds,
|
selectListedIds,
|
||||||
selectChatMessages,
|
selectChatMessages,
|
||||||
@ -39,7 +39,7 @@ export function updateCurrentMessageList(
|
|||||||
): GlobalState {
|
): GlobalState {
|
||||||
const { messageLists } = global.messages;
|
const { messageLists } = global.messages;
|
||||||
let newMessageLists: MessageList[] = messageLists;
|
let newMessageLists: MessageList[] = messageLists;
|
||||||
if (shouldReplaceHistory) {
|
if (shouldReplaceHistory || IS_TEST) {
|
||||||
newMessageLists = chatId ? [{ chatId, threadId, type }] : [];
|
newMessageLists = chatId ? [{ chatId, threadId, type }] : [];
|
||||||
} else if (chatId) {
|
} else if (chatId) {
|
||||||
const last = messageLists[messageLists.length - 1];
|
const last = messageLists[messageLists.length - 1];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user