Apply the auto-fixable lint rules and the formatter, and drop the Vite build artifacts.
Checks / checks (push) Successful in 2m11s
Trigger cinny-mobile / dispatch (push) Successful in 1s

This commit is contained in:
2026-11-01 04:23:53 +11:00
parent 3cd159a63e
commit a6ad8651b3
605 changed files with 11480 additions and 9125 deletions
+14 -6
View File
@@ -1,8 +1,15 @@
import { JoinRule } from 'matrix-js-sdk';
import { AvatarFallback, AvatarImage, color } from 'folds';
import { Icon, Icons } from '../icons';
import React, { ComponentProps, ReactEventHandler, ReactNode, forwardRef, useEffect, useState } from 'react';
import React, {
ComponentProps,
ReactEventHandler,
ReactNode,
forwardRef,
useEffect,
useState,
} from 'react';
import { Blurhash } from 'react-blurhash';
import { Icon, Icons } from '../icons';
import * as css from './RoomAvatar.css';
import { joinRuleToIconSrc } from '../../utils/room';
import colorMXID from '../../../util/colorMXID';
@@ -33,16 +40,17 @@ export function RoomAvatar({ roomId, src, alt, renderFallback }: RoomAvatarProps
const dims = getMediaDimensions(src ?? '');
const blobCached =
!!src &&
(!useAuthentication ||
!isAuthenticatedMediaUrl(src) ||
!!getCachedAuthenticatedMediaUrl(src));
(!useAuthentication || !isAuthenticatedMediaUrl(src) || !!getCachedAuthenticatedMediaUrl(src));
const [loaded, setLoaded] = useState(() => isAvatarCached(src) || blobCached);
useEffect(() => {
if (
authenticatedSrc &&
(isAvatarCached(src) ||
(src && (!useAuthentication || !isAuthenticatedMediaUrl(src) || getCachedAuthenticatedMediaUrl(src))))
(src &&
(!useAuthentication ||
!isAuthenticatedMediaUrl(src) ||
getCachedAuthenticatedMediaUrl(src))))
) {
setLoaded(true);
}