Skip to content

Commit

Permalink
fix(frontend): 投票が反映されない
Browse files Browse the repository at this point in the history
  • Loading branch information
tai-cha committed Jan 16, 2025
1 parent cda8dda commit ebab433
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions packages/frontend/src/components/MkPostForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1056,12 +1056,16 @@ function showDraftMenu() {
hashtags.value = draft.hashtag ?? '';
//if (draft.hashtag) withHashtags.value = true;
if (draft.poll) {
poll.value = {
choices: draft.poll.choices,
multiple: draft.poll.multiple,
expiresAt: draft.poll.expiresAt ? (new Date(draft.poll.expiresAt)).getTime() : null,
expiredAfter: null,
};
// 投票を一時的に空にしないと反映されないため
poll.value = null;
nextTick(() => {
poll.value = {
choices: draft.poll!.choices,
multiple: draft.poll!.multiple,
expiresAt: draft.poll!.expiresAt ? (new Date(draft.poll!.expiresAt)).getTime() : null,
expiredAfter: null,
};
});
}
if (draft.visibleUserIds) {
misskeyApi('users/show', { userIds: draft.visibleUserIds }).then(users => {
Expand Down

0 comments on commit ebab433

Please sign in to comment.