UI Loader: Preload reaction thumbs

This commit is contained in:
Alexander Zinchuk 2022-02-04 15:18:54 +01:00
parent 09acd9ab09
commit a3452d9f58
2 changed files with 5 additions and 2 deletions

View File

@ -29,8 +29,8 @@ type RLottieInstance = import('../../lib/rlottie/RLottie').default;
let lottiePromise: Promise<RLottieClass>;
let RLottie: RLottieClass;
// Time supposed for judges to measure "Transferred Size" in Dev Tools
const LOTTIE_LOAD_DELAY = 5000;
// Time for the main interface to completely load
const LOTTIE_LOAD_DELAY = 3000;
async function ensureLottie() {
if (!lottiePromise) {

View File

@ -19,6 +19,8 @@ import './UiLoader.scss';
// @ts-ignore
import telegramLogoPath from '../../assets/telegram-logo.svg';
// @ts-ignore
import reactionThumbsPath from '../../assets/reaction-thumbs.png';
// @ts-ignore
import monkeyPath from '../../assets/monkey.svg';
import { selectIsRightColumnShown, selectTheme } from '../../modules/selectors';
@ -66,6 +68,7 @@ const preloadTasks = {
loadModule(Bundles.Main, 'Main')
.then(preloadFonts),
preloadAvatars(),
preloadImage(reactionThumbsPath),
]),
authPhoneNumber: () => Promise.all([
preloadFonts(),