fix
This commit is contained in:
parent
d28a38f6ef
commit
3f97bcecc0
|
|
@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<template>
|
||||
<div class="_gaps_m">
|
||||
<FormSection first="true">
|
||||
<FormSection :first="true">
|
||||
<template #label>{{ i18n.ts.reactionDeckSettingTitle }}</template>
|
||||
<template #description>{{ i18n.ts.reactionDeckSettingDescription }}</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -24,20 +24,23 @@ class EmojiPicker {
|
|||
// nop
|
||||
}
|
||||
|
||||
/**
|
||||
* リアクションデッキ・絵文字デッキを動的に切り替えるための{@link ComputedRef}を作成する。
|
||||
*/
|
||||
private createDeckItemCompute(): ComputedRef<string[]> {
|
||||
const itemPresetType = this.itemPresetType;
|
||||
const useReactionDeckItems = defaultStore.reactiveState.useReactionDeckItems;
|
||||
const itemPresetTypeRef = this.itemPresetType;
|
||||
const useReactionDeckItemsRef = defaultStore.reactiveState.useReactionDeckItems;
|
||||
const reactionsRef = defaultStore.reactiveState.reactions;
|
||||
const emojisRef = defaultStore.reactiveState.emojiDeckItems;
|
||||
|
||||
return computed(() => {
|
||||
switch (itemPresetType.value) {
|
||||
switch (itemPresetTypeRef.value) {
|
||||
case 'reactions':
|
||||
return reactionsRef.value;
|
||||
case 'emojis':
|
||||
return emojisRef.value;
|
||||
default:
|
||||
return useReactionDeckItems.value ? reactionsRef.value : emojisRef.value;
|
||||
return useReactionDeckItemsRef.value ? reactionsRef.value : emojisRef.value;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,14 +26,14 @@ class ReactionPicker {
|
|||
manualShowing: this.manualShowing,
|
||||
}, {
|
||||
done: reaction => {
|
||||
this.onChosen!(reaction);
|
||||
if (this.onChosen) this.onChosen(reaction);
|
||||
},
|
||||
close: () => {
|
||||
this.manualShowing.value = false;
|
||||
},
|
||||
closed: () => {
|
||||
this.src.value = null;
|
||||
this.onClosed!();
|
||||
if (this.onClosed) this.onClosed();
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue