diff --git a/app/js/tl/parse.js b/app/js/tl/parse.js index 5e86bb62..95f54603 100644 --- a/app/js/tl/parse.js +++ b/app/js/tl/parse.js @@ -1361,10 +1361,14 @@ function pollParse(poll, acct_id) { var refresh = ` ${lang.lang_manager_refresh} ` - if (poll.voted) { + if (poll.voted && poll.own_votes.length) { var myvote = lang.lang_parse_voted if (poll.expired) myvote = myvote + '/' + lang.lang_parse_endedvote var result_hide = '' + } else if (poll.voted && !poll.own_votes.length) { + var myvote = lang.lang_parse_myvote + if (poll.expired) myvote = myvote + '/' + lang.lang_parse_endedvote + var result_hide = '' } else if (poll.expired) { var myvote = lang.lang_parse_endedvote var result_hide = '' @@ -1381,7 +1385,7 @@ function pollParse(poll, acct_id) { } var ended = date(poll.expires_at, datetype) var pollHtml = '' - if (choices[0].votes_count) { + if (choices[0].votes_count === 0 || choices[0].votes_count >0) { var max = _.maxBy(choices, 'votes_count').votes_count } else { var max = 0 @@ -1393,14 +1397,14 @@ function pollParse(poll, acct_id) { for (var i = 0; i < minechoice.length; i++) { var me = minechoice[i] if (me == keyc) { - var voteit = '✅' + var voteit = '' break } } if (!poll.voted && !poll.expired) { var votesel = "voteSelMastodon('" + acct_id + "','" + poll.id + "'," + keyc + ',' + poll.multiple + ')' - var voteclass = 'pointer waves-effect waves-light' + var voteclass = 'pointer' } else { var votesel = '' var voteclass = '' @@ -1421,7 +1425,7 @@ function pollParse(poll, acct_id) { pollHtml = pollHtml + `