upd: add ability to refresh poll

This commit is contained in:
Marie 2024-10-13 03:44:07 +02:00 committed by Hazelnoot
parent 68b90df00b
commit dd58a4aa92
10 changed files with 199 additions and 2 deletions

View file

@ -98,7 +98,7 @@ export class ApQuestionService {
const newCount = apChoices.filter(ap => ap.name === choice).at(0)?.replies?.totalItems;
if (newCount == null) throw new Error('invalid newCount: ' + newCount);
if (oldCount !== newCount) {
if (!(oldCount > newCount)) {
changed = true;
poll.votes[poll.choices.indexOf(choice)] = newCount;
}