Chat List: Fix new chats not appearing (#5389)
This commit is contained in:
parent
31db2eed8f
commit
f7e316f0b3
@ -67,8 +67,8 @@ addActionHandler('apiUpdate', (global, actions, update): ActionReturnType => {
|
|||||||
setGlobal(global);
|
setGlobal(global);
|
||||||
|
|
||||||
const updatedChat = selectChat(global, update.id);
|
const updatedChat = selectChat(global, update.id);
|
||||||
if (!update.noTopChatsRequest && updatedChat && !selectIsChatListed(global, update.id)
|
if (!update.noTopChatsRequest && !selectIsChatListed(global, update.id)
|
||||||
&& !updatedChat.isNotJoined) {
|
&& !updatedChat?.isNotJoined) {
|
||||||
// Reload top chats to update chat listing
|
// Reload top chats to update chat listing
|
||||||
actions.loadTopChats();
|
actions.loadTopChats();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -166,7 +166,7 @@ addActionHandler('apiUpdate', (global, actions, update): ActionReturnType => {
|
|||||||
setGlobal(global);
|
setGlobal(global);
|
||||||
|
|
||||||
// Reload dialogs if chat is not present in the list
|
// Reload dialogs if chat is not present in the list
|
||||||
if (!isLocal && chat && !chat.isNotJoined && !selectIsChatListed(global, chatId)) {
|
if (!isLocal && !chat?.isNotJoined && !selectIsChatListed(global, chatId)) {
|
||||||
actions.loadTopChats();
|
actions.loadTopChats();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -446,7 +446,7 @@ addActionHandler('apiUpdate', (global, actions, update): ActionReturnType => {
|
|||||||
|
|
||||||
const chat = selectChat(global, chatId);
|
const chat = selectChat(global, chatId);
|
||||||
// Reload dialogs if chat is not present in the list
|
// Reload dialogs if chat is not present in the list
|
||||||
if (chat && !chat.isNotJoined && !selectIsChatListed(global, chatId)) {
|
if (!chat?.isNotJoined && !selectIsChatListed(global, chatId)) {
|
||||||
actions.loadTopChats();
|
actions.loadTopChats();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user