From 62f26543581eb7113b4e7c52bc3e6f9d648c2ab0 Mon Sep 17 00:00:00 2001 From: Cutls Date: Thu, 6 Jun 2019 23:42:02 +0900 Subject: [PATCH] Fix: Notice "ended" when poll has been ended without your vote --- app/js/tl/parse.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/js/tl/parse.js b/app/js/tl/parse.js index 759f0ade..71a38159 100644 --- a/app/js/tl/parse.js +++ b/app/js/tl/parse.js @@ -494,6 +494,9 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) { if (toot.poll.voted) { var myvote = lang.lang_parse_voted; var result_hide = ""; + } else if (toot.poll.expired) { + var myvote = lang.lang_parse_endedvote; + var result_hide = ""; } else { var myvote = '' + lang.lang_parse_vote + '
'; if (choices[0].votes_count === 0 || choices[0].votes_count > 0) { @@ -501,11 +504,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) { } var result_hide = "hide"; } - if (toot.poll.expired) { - var ended = lang.lang_parse_endedvote; - } else { - var ended = date(toot.poll.expires_at, datetype); - } + var ended = date(toot.poll.expires_at, datetype); Object.keys(choices).forEach(function (keyc) { var choice = choices[keyc]; if (!toot.poll.voted && !toot.poll.expired) {