Message List: Fix bot Start button not displayed (#3378)
This commit is contained in:
parent
42666c78fe
commit
c15abbb5fe
@ -45,7 +45,8 @@ import {
|
|||||||
selectReplyingToId,
|
selectReplyingToId,
|
||||||
selectTabState,
|
selectTabState,
|
||||||
selectTheme,
|
selectTheme,
|
||||||
selectThreadInfo, selectThreadTopMessageId,
|
selectThreadInfo,
|
||||||
|
selectThreadTopMessageId,
|
||||||
} from '../../global/selectors';
|
} from '../../global/selectors';
|
||||||
import {
|
import {
|
||||||
getCanPostInChat,
|
getCanPostInChat,
|
||||||
|
|||||||
@ -68,7 +68,8 @@ import {
|
|||||||
selectDraft,
|
selectDraft,
|
||||||
selectEditingId,
|
selectEditingId,
|
||||||
selectEditingMessage,
|
selectEditingMessage,
|
||||||
selectEditingScheduledId, selectFirstMessageId,
|
selectEditingScheduledId,
|
||||||
|
selectFirstMessageId,
|
||||||
selectFirstUnreadId,
|
selectFirstUnreadId,
|
||||||
selectFocusedMessageId,
|
selectFocusedMessageId,
|
||||||
selectForwardsCanBeSentToChat,
|
selectForwardsCanBeSentToChat,
|
||||||
@ -1020,11 +1021,12 @@ async function loadViewportMessages<T extends GlobalState>(
|
|||||||
const allMessages = ([] as ApiMessage[]).concat(messages, localMessages);
|
const allMessages = ([] as ApiMessage[]).concat(messages, localMessages);
|
||||||
const byId = buildCollectionByKey(allMessages, 'id');
|
const byId = buildCollectionByKey(allMessages, 'id');
|
||||||
const ids = Object.keys(byId).map(Number);
|
const ids = Object.keys(byId).map(Number);
|
||||||
const threadFirstMessageId = selectFirstMessageId(global, chatId, threadId) || {};
|
|
||||||
if (threadId
|
if (threadId !== MAIN_THREAD_ID) {
|
||||||
&& threadFirstMessageId !== threadId
|
const threadFirstMessageId = selectFirstMessageId(global, chatId, threadId) || {};
|
||||||
&& (!ids[0] || threadFirstMessageId === ids[0])) {
|
if ((!ids[0] || threadFirstMessageId === ids[0]) && threadFirstMessageId !== threadId) {
|
||||||
ids.unshift(threadId);
|
ids.unshift(threadId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
global = addChatMessagesById(global, chatId, byId);
|
global = addChatMessagesById(global, chatId, byId);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user