From ba18fbf6fe7bf10dc4d0863cce6ce790ecf475d4 Mon Sep 17 00:00:00 2001 From: HellhoundSoftware Date: Fri, 17 Jan 2025 19:23:53 -0500 Subject: [PATCH 1/2] Sort emoji categories consistently --- packages/frontend/src/custom-emojis.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/custom-emojis.ts b/packages/frontend/src/custom-emojis.ts index b4b6dff570..91784bb2cd 100644 --- a/packages/frontend/src/custom-emojis.ts +++ b/packages/frontend/src/custom-emojis.ts @@ -17,7 +17,7 @@ export const customEmojiCategories = computed<[ ...string[], null ]>(() => { categories.add(emoji.category); } } - return markRaw([...Array.from(categories), null]); + return markRaw([...Array.from(categories).sort(), null]); }); export function compareBySortKey(a: Misskey.entities.EmojiSimple, b: Misskey.entities.EmojiSimple): number { From 4d3ddb8862f65c404c0a7a9313807546ddf47634 Mon Sep 17 00:00:00 2001 From: HellhoundSoftware Date: Fri, 17 Jan 2025 19:25:23 -0500 Subject: [PATCH 2/2] Regenerate misskey-js type info --- packages/misskey-js/src/autogen/types.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index 888e46e008..5d82f62e50 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -4948,6 +4948,7 @@ export type components = { localOnly?: boolean; isSensitive?: boolean; roleIdsThatCanBeUsedThisEmojiAsReaction?: string[]; + sortKey: string | null; }; EmojiDetailed: { /** Format: id */ @@ -4962,6 +4963,7 @@ export type components = { isSensitive: boolean; localOnly: boolean; roleIdsThatCanBeUsedThisEmojiAsReaction: string[]; + sortKey: string | null; }; Flash: { /** @@ -7319,6 +7321,7 @@ export type operations = { isSensitive?: boolean; localOnly?: boolean; roleIdsThatCanBeUsedThisEmojiAsReaction?: string[]; + sortKey?: string | null; }; }; }; @@ -7684,6 +7687,7 @@ export type operations = { /** @description The local host is represented with `null`. The field exists for compatibility with other API endpoints that return files. */ host: string | null; url: string; + sortKey: string | null; })[]; }; }; @@ -7951,6 +7955,7 @@ export type operations = { isSensitive?: boolean; localOnly?: boolean; roleIdsThatCanBeUsedThisEmojiAsReaction?: string[]; + sortKey?: string | null; }; }; };