Merge pull request 'Sort emoji categories consistently' (#55) from fix-emoji-category-sort into dev

Reviewed-on: https://codeberg.org/yeentown/barkey/pulls/55
Reviewed-by: zima <zima@noreply.codeberg.org>
This commit is contained in:
zima 2025-01-22 22:36:50 +00:00
commit f4e04606c6
2 changed files with 6 additions and 1 deletions

View file

@ -17,7 +17,7 @@ export const customEmojiCategories = computed<[ ...string[], null ]>(() => {
categories.add(emoji.category); 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 { export function compareBySortKey(a: Misskey.entities.EmojiSimple, b: Misskey.entities.EmojiSimple): number {

View file

@ -4948,6 +4948,7 @@ export type components = {
localOnly?: boolean; localOnly?: boolean;
isSensitive?: boolean; isSensitive?: boolean;
roleIdsThatCanBeUsedThisEmojiAsReaction?: string[]; roleIdsThatCanBeUsedThisEmojiAsReaction?: string[];
sortKey: string | null;
}; };
EmojiDetailed: { EmojiDetailed: {
/** Format: id */ /** Format: id */
@ -4962,6 +4963,7 @@ export type components = {
isSensitive: boolean; isSensitive: boolean;
localOnly: boolean; localOnly: boolean;
roleIdsThatCanBeUsedThisEmojiAsReaction: string[]; roleIdsThatCanBeUsedThisEmojiAsReaction: string[];
sortKey: string | null;
}; };
Flash: { Flash: {
/** /**
@ -7319,6 +7321,7 @@ export type operations = {
isSensitive?: boolean; isSensitive?: boolean;
localOnly?: boolean; localOnly?: boolean;
roleIdsThatCanBeUsedThisEmojiAsReaction?: string[]; 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. */ /** @description The local host is represented with `null`. The field exists for compatibility with other API endpoints that return files. */
host: string | null; host: string | null;
url: string; url: string;
sortKey: string | null;
})[]; })[];
}; };
}; };
@ -7951,6 +7955,7 @@ export type operations = {
isSensitive?: boolean; isSensitive?: boolean;
localOnly?: boolean; localOnly?: boolean;
roleIdsThatCanBeUsedThisEmojiAsReaction?: string[]; roleIdsThatCanBeUsedThisEmojiAsReaction?: string[];
sortKey?: string | null;
}; };
}; };
}; };