Skip to content

Commit

Permalink
hotfix(picker): 再利用するpopupで誤ってdisposeしている問題 (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
taiyme authored Jul 17, 2024
1 parent e909246 commit 52b15e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/frontend/src/scripts/emoji-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ class EmojiPicker {

public async init() {
const emojisRef = defaultStore.reactiveState.pinnedEmojis;
const { dispose } = popup(defineAsyncComponent(() => import('@/components/MkEmojiPickerDialog.vue')), {
// NOTE: 再利用するのでdisposeしないこと
popup(defineAsyncComponent(() => import('@/components/MkEmojiPickerDialog.vue')), {
src: this.src,
pinnedEmojis: emojisRef,
asReactionPicker: false,
Expand All @@ -41,7 +42,6 @@ class EmojiPicker {
closed: () => {
this.src.value = null;
if (this.onClosed) this.onClosed();
dispose();
},
});
}
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend/src/scripts/reaction-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class ReactionPicker {

public async init() {
const reactionsRef = defaultStore.reactiveState.reactions;
const { dispose } = popup(defineAsyncComponent(() => import('@/components/MkEmojiPickerDialog.vue')), {
// NOTE: 再利用するのでdisposeしないこと
popup(defineAsyncComponent(() => import('@/components/MkEmojiPickerDialog.vue')), {
src: this.src,
pinnedEmojis: reactionsRef,
asReactionPicker: true,
Expand All @@ -37,7 +38,6 @@ class ReactionPicker {
closed: () => {
this.src.value = null;
if (this.onClosed) this.onClosed();
dispose();
},
});
}
Expand Down

0 comments on commit 52b15e4

Please sign in to comment.