Fix the mechanical lint groups and delete the unused bindings. [skip build]
This commit is contained in:
@@ -11,7 +11,6 @@ import { useMediaAuthentication } from '../../../hooks/useMediaAuthentication';
|
||||
import { useAuthenticatedMediaUrl } from '../../../hooks/useAuthenticatedMediaUrl';
|
||||
import { getTextShadowColor } from '../../../utils/common';
|
||||
import { useFilePicker } from '../../../hooks/useFilePicker';
|
||||
import { useObjectURL } from '../../../hooks/useObjectURL';
|
||||
import { createUploadAtom, UploadSuccess } from '../../../state/upload';
|
||||
import { CompactUploadCardRenderer } from '../../../components/upload-card';
|
||||
import { useUserColorPreference } from '../../../hooks/useUserColor';
|
||||
@@ -51,7 +50,7 @@ function ProfileBanner({
|
||||
const userId = mx.getUserId()!;
|
||||
const profile = useUserProfile(userId);
|
||||
const presence = useUserPresence(userId);
|
||||
const [userBanner, setUserBanner, loading] = useUserBanner();
|
||||
const [userBanner, setUserBanner] = useUserBanner();
|
||||
const [collectibles, updateCollectible] = useUserCollectibles();
|
||||
const [saving, setSaving] = useState(false);
|
||||
const [error, setError] = useState<string>();
|
||||
@@ -118,7 +117,7 @@ function ProfileBanner({
|
||||
setColorError(undefined);
|
||||
try {
|
||||
await setColorPreference({ on_dark: localOnDark, on_light: localOnLight });
|
||||
} catch (e) {
|
||||
} catch {
|
||||
setColorError('Failed to save colors. Your server may not support profile fields (MSC4133).');
|
||||
}
|
||||
setSavingColor(false);
|
||||
@@ -131,7 +130,7 @@ function ProfileBanner({
|
||||
await setColorPreference(undefined);
|
||||
setLocalOnDark('#ffd9f5');
|
||||
setLocalOnLight('#440000');
|
||||
} catch (e) {
|
||||
} catch {
|
||||
setColorError('Failed to remove colors');
|
||||
}
|
||||
setSavingColor(false);
|
||||
@@ -157,7 +156,7 @@ function ProfileBanner({
|
||||
setVerbError(undefined);
|
||||
try {
|
||||
await setTypingVerb(parsed);
|
||||
} catch (e) {
|
||||
} catch {
|
||||
setVerbError('Failed to save typing verb. Server may not support profile fields (MSC4133).');
|
||||
}
|
||||
setSavingVerb(false);
|
||||
@@ -169,7 +168,7 @@ function ProfileBanner({
|
||||
try {
|
||||
await setTypingVerb(undefined);
|
||||
setLocalVerb('');
|
||||
} catch (e) {
|
||||
} catch {
|
||||
setVerbError('Failed to remove typing verb');
|
||||
}
|
||||
setSavingVerb(false);
|
||||
@@ -330,7 +329,6 @@ function ProfileBanner({
|
||||
}, [mx, useAuthentication, userBanner, refreshTrigger]);
|
||||
|
||||
const [imageFile, setImageFile] = useState<File>();
|
||||
const imageFileURL = useObjectURL(imageFile);
|
||||
const uploadAtom = useMemo(() => {
|
||||
if (imageFile) return createUploadAtom(imageFile);
|
||||
return undefined;
|
||||
@@ -414,7 +412,7 @@ function ProfileBanner({
|
||||
await setUserBanner(undefined);
|
||||
// Sync user object to propagate changes throughout app
|
||||
await syncUserAvatar();
|
||||
} catch (e) {
|
||||
} catch {
|
||||
setError('Failed to remove banner.');
|
||||
}
|
||||
setSaving(false);
|
||||
@@ -1209,8 +1207,6 @@ function ProfileBanner({
|
||||
}
|
||||
|
||||
export function Profile() {
|
||||
const mx = useMatrixClient();
|
||||
const userId = mx.getUserId()!;
|
||||
const avatarRef = useRef<HTMLDivElement>(null);
|
||||
const nameRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user