Skip to content

Commit

Permalink
Merge pull request #43 from lqvp/shahu
Browse files Browse the repository at this point in the history
fix: リアクション数を隠す機能が正しく動作するように
  • Loading branch information
chan-mai authored Nov 11, 2024
2 parents d2fc8f5 + 19f3d61 commit 2644aab
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SPDX-License-Identifier: AGPL-3.0-only
@contextmenu.prevent.stop="menu"
>
<MkReactionIcon :class="defaultStore.state.limitWidthOfReaction ? $style.limitWidth : ''" :reaction="reaction" :emojiUrl="note.reactionEmojis[reaction.substring(1, reaction.length - 1)]"/>
<span :class="$style.count">{{ count }}</span>
<span v-if="!hideReactionCount" :class="$style.count">{{ count }}</span>
</button>
</template>

Expand Down Expand Up @@ -148,23 +148,20 @@ onMounted(() => {

if (!mock) {
useTooltip(buttonEl, async (showing) => {
const useGet = !reactionChecksMuting.value;
const apiCall = useGet ? misskeyApiGet : misskeyApi;
const reactions = !defaultStore.state.hideReactionUsers ? await apiCall('notes/reactions', {
const reactions = !defaultStore.state.hideReactionUsers ? await misskeyApiGet('notes/reactions', {
noteId: props.note.id,
type: props.reaction,
limit: 10,
_cacheKey_: props.count,
}) : [];

const users = reactions.map(x => x.user);
const count = users.length;

const { dispose } = os.popup(XDetails, {
showing,
reaction: props.reaction,
users,
count,
count: props.count,
targetElement: buttonEl.value,
}, {
closed: () => dispose(),
Expand Down

0 comments on commit 2644aab

Please sign in to comment.