diff --git a/app/components/status/StatusPoll.vue b/app/components/status/StatusPoll.vue index b39b5351..333606fd 100644 --- a/app/components/status/StatusPoll.vue +++ b/app/components/status/StatusPoll.vue @@ -14,7 +14,7 @@ const timeAgoOptions = useTimeAgoOptions() const expiredTimeAgo = useTimeAgo(poll.expiresAt!, timeAgoOptions) const expiredTimeFormatted = useFormattedDateTime(poll.expiresAt!) const { formatPercentage } = useHumanReadableNumber() -const loading = ref(false) +const isLoading = ref(false) const { client } = useMasto() @@ -41,11 +41,11 @@ async function vote(e: Event) { } async function refresh() { - if (loading.value) { + if (isLoading.value) { return } - loading.value = true + isLoading.value = true try { const newPoll = await client.value.v1.polls.$select(poll.id).fetch() Object.assign(poll, newPoll) @@ -55,7 +55,7 @@ async function refresh() { console.error(e) } finally { - loading.value = false + isLoading.value = false } } @@ -106,9 +106,13 @@ const votersCount = computed(() => poll.votersCount ?? poll.votesCount ?? 0) -