Top chat messages preload: Less, faster, exclude pinned
This commit is contained in:
parent
f2e8977413
commit
47dc76e096
@ -60,7 +60,7 @@ export const BLOCKED_LIST_LIMIT = 100;
|
||||
export const PROFILE_PHOTOS_LIMIT = 40;
|
||||
export const PROFILE_SENSITIVE_AREA = 500;
|
||||
|
||||
export const TOP_CHAT_MESSAGES_PRELOAD_LIMIT = 25;
|
||||
export const TOP_CHAT_MESSAGES_PRELOAD_LIMIT = 20;
|
||||
export const ALL_CHATS_PRELOAD_DISABLED = false;
|
||||
|
||||
export const ANIMATION_LEVEL_MIN = 0;
|
||||
|
||||
@ -16,7 +16,6 @@ import {
|
||||
RE_TME_LINK,
|
||||
TIPS_USERNAME,
|
||||
} from '../../../config';
|
||||
import { IS_TOUCH_ENV } from '../../../util/environment';
|
||||
import { callApi } from '../../../api/gramjs';
|
||||
import {
|
||||
addChats,
|
||||
@ -46,7 +45,7 @@ import {
|
||||
isChatSummaryOnly, isChatArchived, prepareChatList, isChatBasicGroup,
|
||||
} from '../../helpers';
|
||||
|
||||
const TOP_CHATS_PRELOAD_PAUSE = 200;
|
||||
const TOP_CHATS_PRELOAD_PAUSE = 100;
|
||||
// We expect this ID does not exist
|
||||
const TMP_CHAT_ID = -1;
|
||||
|
||||
@ -81,10 +80,6 @@ addReducer('preloadTopChatMessages', (global, actions) => {
|
||||
preloadedChatIds.push(chatToPreload.id);
|
||||
|
||||
actions.loadViewportMessages({ chatId: chatToPreload.id, threadId: MAIN_THREAD_ID });
|
||||
|
||||
if (IS_TOUCH_ENV) {
|
||||
actions.loadPinnedMessages({ chatId: chatToPreload.id });
|
||||
}
|
||||
}
|
||||
})();
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user