Merge 3b3234c9f8
into d522d1bf26
This commit is contained in:
commit
36cf5a7ee6
|
@ -136,6 +136,7 @@
|
|||
- Fix: iPadOSでdeck uiをマウスカーソルによってスクロールできない問題を修正
|
||||
- NOTE: 構造上クラシックUIを新しいデザインシステムに移行することが困難なため、クラシックUIが削除されました
|
||||
- デッキUIでカラムを中央寄せにし、メインカラムの左右にウィジェットカラムを配置し、ナビゲーションバーを上部に表示することである程度クラシックUIを再現できます
|
||||
- Fix: Unicode絵文字とカスタム絵文字の名前が重複したときにカスタム絵文字がオートコンプリートにサジェストされない問題を修正
|
||||
|
||||
### Server
|
||||
- Enhance 全体的なパフォーマンス向上
|
||||
|
|
|
@ -25,7 +25,7 @@ export function searchEmoji(query: string | null, emojiDb: EmojiDef[], max = 30)
|
|||
// 完全一致(エイリアスなし)
|
||||
emojiDb.some(x => {
|
||||
if (x.name === query && !x.aliasOf) {
|
||||
matched.set(x.name, { emoji: x, score: query.length + 3 });
|
||||
matched.set(x.emoji, { emoji: x, score: query.length + 3 });
|
||||
}
|
||||
return matched.size === max;
|
||||
});
|
||||
|
@ -33,8 +33,8 @@ export function searchEmoji(query: string | null, emojiDb: EmojiDef[], max = 30)
|
|||
// 完全一致(エイリアス込み)
|
||||
if (matched.size < max) {
|
||||
emojiDb.some(x => {
|
||||
if (x.name === query && !matched.has(x.aliasOf ?? x.name)) {
|
||||
matched.set(x.aliasOf ?? x.name, { emoji: x, score: query.length + 2 });
|
||||
if (x.name === query && !matched.has(x.emoji)) {
|
||||
matched.set(x.emoji, { emoji: x, score: query.length + 2 });
|
||||
}
|
||||
return matched.size === max;
|
||||
});
|
||||
|
@ -43,8 +43,8 @@ export function searchEmoji(query: string | null, emojiDb: EmojiDef[], max = 30)
|
|||
// 前方一致(エイリアスなし)
|
||||
if (matched.size < max) {
|
||||
emojiDb.some(x => {
|
||||
if (x.name.startsWith(query) && !x.aliasOf && !matched.has(x.name)) {
|
||||
matched.set(x.name, { emoji: x, score: query.length + 1 });
|
||||
if (x.name.startsWith(query) && !x.aliasOf && !matched.has(x.emoji)) {
|
||||
matched.set(x.emoji, { emoji: x, score: query.length + 1 });
|
||||
}
|
||||
return matched.size === max;
|
||||
});
|
||||
|
@ -53,8 +53,8 @@ export function searchEmoji(query: string | null, emojiDb: EmojiDef[], max = 30)
|
|||
// 前方一致(エイリアス込み)
|
||||
if (matched.size < max) {
|
||||
emojiDb.some(x => {
|
||||
if (x.name.startsWith(query) && !matched.has(x.aliasOf ?? x.name)) {
|
||||
matched.set(x.aliasOf ?? x.name, { emoji: x, score: query.length });
|
||||
if (x.name.startsWith(query) && !matched.has(x.emoji)) {
|
||||
matched.set(x.emoji, { emoji: x, score: query.length });
|
||||
}
|
||||
return matched.size === max;
|
||||
});
|
||||
|
@ -63,8 +63,8 @@ export function searchEmoji(query: string | null, emojiDb: EmojiDef[], max = 30)
|
|||
// 部分一致(エイリアス込み)
|
||||
if (matched.size < max) {
|
||||
emojiDb.some(x => {
|
||||
if (x.name.includes(query) && !matched.has(x.aliasOf ?? x.name)) {
|
||||
matched.set(x.aliasOf ?? x.name, { emoji: x, score: query.length - 1 });
|
||||
if (x.name.includes(query) && !matched.has(x.emoji)) {
|
||||
matched.set(x.emoji, { emoji: x, score: query.length - 1 });
|
||||
}
|
||||
return matched.size === max;
|
||||
});
|
||||
|
@ -87,8 +87,8 @@ export function searchEmoji(query: string | null, emojiDb: EmojiDef[], max = 30)
|
|||
}
|
||||
|
||||
// 半分以上の文字が含まれていればヒットとする
|
||||
if (hit > Math.ceil(queryChars.length / 2) && hit - 2 > (matched.get(x.aliasOf ?? x.name)?.score ?? 0)) {
|
||||
hitEmojis.set(x.aliasOf ?? x.name, { emoji: x, score: hit - 2 });
|
||||
if (hit > Math.ceil(queryChars.length / 2) && hit - 2 > (matched.get(x.emoji)?.score ?? 0)) {
|
||||
hitEmojis.set(x.emoji, { emoji: x, score: hit - 2 });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue