fixed bug and now refresh regardless of if its ended or not
This commit is contained in:
parent
b5be382e97
commit
29bba2ee30
1 changed files with 4 additions and 4 deletions
|
@ -22,8 +22,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<span v-if="isVoted">{{ i18n.ts._poll.voted }}</span>
|
<span v-if="isVoted">{{ i18n.ts._poll.voted }}</span>
|
||||||
<span v-else-if="closed">{{ i18n.ts._poll.closed }}</span>
|
<span v-else-if="closed">{{ i18n.ts._poll.closed }}</span>
|
||||||
<span v-if="remaining > 0"> · {{ timer }}</span>
|
<span v-if="remaining > 0"> · {{ timer }}</span>
|
||||||
<span v-if="!closed && $i && !props.local"> · </span>
|
<span v-if="$i && !props.local"> · </span>
|
||||||
<a v-if="!closed && $i && !props.local" style="color: inherit;" @click="refreshVotes()">{{ i18n.ts.reload }}</a>
|
<a v-if="$i && !props.local" style="color: inherit;" @click="refreshVotes()">{{ i18n.ts.reload }}</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -98,9 +98,9 @@ const vote = async (id) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const refreshVotes = async () => {
|
const refreshVotes = async () => {
|
||||||
pleaseLogin(undefined, pleaseLoginContext.value);
|
pleaseLogin();
|
||||||
|
|
||||||
if (props.readOnly || closed.value) return;
|
if (props.readOnly) return;
|
||||||
await misskeyApi('notes/polls/refresh', {
|
await misskeyApi('notes/polls/refresh', {
|
||||||
noteId: props.noteId,
|
noteId: props.noteId,
|
||||||
// Sadly due to being in the same component and the poll being a prop we require to break Vue's recommendation of not mutating the prop to update it.
|
// Sadly due to being in the same component and the poll being a prop we require to break Vue's recommendation of not mutating the prop to update it.
|
||||||
|
|
Loading…
Reference in a new issue