UI Loader: Preload reaction thumbs
This commit is contained in:
parent
09acd9ab09
commit
a3452d9f58
@ -29,8 +29,8 @@ type RLottieInstance = import('../../lib/rlottie/RLottie').default;
|
|||||||
let lottiePromise: Promise<RLottieClass>;
|
let lottiePromise: Promise<RLottieClass>;
|
||||||
let RLottie: RLottieClass;
|
let RLottie: RLottieClass;
|
||||||
|
|
||||||
// Time supposed for judges to measure "Transferred Size" in Dev Tools
|
// Time for the main interface to completely load
|
||||||
const LOTTIE_LOAD_DELAY = 5000;
|
const LOTTIE_LOAD_DELAY = 3000;
|
||||||
|
|
||||||
async function ensureLottie() {
|
async function ensureLottie() {
|
||||||
if (!lottiePromise) {
|
if (!lottiePromise) {
|
||||||
|
|||||||
@ -19,6 +19,8 @@ import './UiLoader.scss';
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import telegramLogoPath from '../../assets/telegram-logo.svg';
|
import telegramLogoPath from '../../assets/telegram-logo.svg';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
import reactionThumbsPath from '../../assets/reaction-thumbs.png';
|
||||||
|
// @ts-ignore
|
||||||
import monkeyPath from '../../assets/monkey.svg';
|
import monkeyPath from '../../assets/monkey.svg';
|
||||||
import { selectIsRightColumnShown, selectTheme } from '../../modules/selectors';
|
import { selectIsRightColumnShown, selectTheme } from '../../modules/selectors';
|
||||||
|
|
||||||
@ -66,6 +68,7 @@ const preloadTasks = {
|
|||||||
loadModule(Bundles.Main, 'Main')
|
loadModule(Bundles.Main, 'Main')
|
||||||
.then(preloadFonts),
|
.then(preloadFonts),
|
||||||
preloadAvatars(),
|
preloadAvatars(),
|
||||||
|
preloadImage(reactionThumbsPath),
|
||||||
]),
|
]),
|
||||||
authPhoneNumber: () => Promise.all([
|
authPhoneNumber: () => Promise.all([
|
||||||
preloadFonts(),
|
preloadFonts(),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user