mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-21 17:41:25 -08:00
fix cats key from refractor
This commit is contained in:
3 files changed
+11
-4
No files matched your search
@@ -20,8 +20,12 @@ export function AnimalCosmetics({ profile, userId }: Readonly<AnimalCosmeticsPro
|
||||
const setGlobalProfiles = useSetAtom(profilesCacheAtom);
|
||||
const [renderAnimals, setRenderAnimals] = useSetting(settingsAtom, 'renderAnimals');
|
||||
|
||||
const isCat = profile.isCat || profile.extended?.['kitty.meow.is_cat'] === true;
|
||||
const hasCats = profile.hasCats || profile.extended?.['kitty.meow.has_cats'] === true;
|
||||
const isCat =
|
||||
profile.isCat ||
|
||||
profile.extended?.[prefix.MATRIX_SABLE_UNSTABLE_ANIMAL_IDENTITY_IS_CAT_PROPERTY_NAME] === true;
|
||||
const hasCats =
|
||||
profile.hasCats ||
|
||||
profile.extended?.[prefix.MATRIX_SABLE_UNSTABLE_ANIMAL_IDENTITY_HAS_CAT_PROPERTY_NAME] === true;
|
||||
|
||||
const handleSaveField = useCallback(
|
||||
async (key: string, value: boolean) => {
|
||||
|
||||
@@ -488,7 +488,10 @@ function ProfileExtended({ profile, userId }: Readonly<ProfileProps>) {
|
||||
const currentStatus = presence?.status || '';
|
||||
|
||||
// Keys we don't render here nor handle seperately but still need to exclude
|
||||
const EXCLUDED_KEYS = new Set(['kitty.meow.is_cat', 'kitty.meow.has_cats']);
|
||||
const EXCLUDED_KEYS = new Set([
|
||||
prefix.MATRIX_SABLE_UNSTABLE_ANIMAL_IDENTITY_IS_CAT_PROPERTY_NAME,
|
||||
prefix.MATRIX_SABLE_UNSTABLE_ANIMAL_IDENTITY_HAS_CAT_PROPERTY_NAME,
|
||||
]);
|
||||
|
||||
// Unknown fields / unimplemented non-matrix-spec fields
|
||||
// Only renders them, can't edit or set
|
||||
|
||||
@@ -11,4 +11,4 @@ export const MATRIX_SABLE_UNSTABLE_NAME_COLOR_DARK_PROPERTY_NAME =
|
||||
export const MATRIX_SABLE_UNSTABLE_NAME_COLOR_LIGHT_PROPERTY_NAME =
|
||||
'moe.sable.app.name_color_light_theme';
|
||||
export const MATRIX_SABLE_UNSTABLE_ANIMAL_IDENTITY_IS_CAT_PROPERTY_NAME = 'kitty.meow.is_cat';
|
||||
export const MATRIX_SABLE_UNSTABLE_ANIMAL_IDENTITY_HAS_CAT_PROPERTY_NAME = 'kitty.meow.has_cat';
|
||||
export const MATRIX_SABLE_UNSTABLE_ANIMAL_IDENTITY_HAS_CAT_PROPERTY_NAME = 'kitty.meow.has_cats';
|
||||
Reference in new issue
Block a user