From 2da7ba412eadc0b5421380aedc6b10c2c76d9417 Mon Sep 17 00:00:00 2001 From: hampus-fluxer Date: Sun, 4 Jan 2026 01:06:25 +0100 Subject: [PATCH] fix(app): evaluate preview avatar urls lazily (#15) --- .../modals/tabs/AppearanceTab/InterfaceTab.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/fluxer_app/src/components/modals/tabs/AppearanceTab/InterfaceTab.tsx b/fluxer_app/src/components/modals/tabs/AppearanceTab/InterfaceTab.tsx index 72eebaa1..059ded20 100644 --- a/fluxer_app/src/components/modals/tabs/AppearanceTab/InterfaceTab.tsx +++ b/fluxer_app/src/components/modals/tabs/AppearanceTab/InterfaceTab.tsx @@ -36,8 +36,6 @@ import AccessibilityStore, {ChannelTypingIndicatorMode} from '~/stores/Accessibi import {cdnUrl} from '~/utils/UrlUtils'; import styles from './InterfaceTab.module.css'; -const TYPING_PREVIEW_AVATAR_URLS = [1, 2, 3].map((index) => cdnUrl(`avatars/${index}.png`)); - const ChannelListPreview = observer(({mode}: {mode: ChannelTypingIndicatorMode}) => { const typingIndicator = mode !== ChannelTypingIndicatorMode.HIDDEN ? ( @@ -52,8 +50,13 @@ const ChannelListPreview = observer(({mode}: {mode: ChannelTypingIndicatorMode}) {mode === ChannelTypingIndicatorMode.AVATARS && ( - {TYPING_PREVIEW_AVATAR_URLS.map((avatarUrl, index) => ( - + {[1, 2, 3].map((index) => ( + ))} )}