Fix vote list update popup on first vote entry

This commit is contained in:
2026-02-08 14:55:39 +01:00
parent 02d15e9c50
commit fadd72d5c4
5 changed files with 10 additions and 1 deletions

View File

@@ -34,7 +34,12 @@ export async function loadSuggestionsData() {
const latest = await api.allSuggestions();
const latestSig = signatureSuggestions(latest);
const changed = latestSig !== state.allSuggestionsSig;
if (changed && state.phase === "Vote" && state.allSuggestionsSig) {
if (
changed &&
state.phase === "Vote" &&
state.votesRendered &&
state.allSuggestionsSig
) {
const added = latest
.filter((s) => !prevById[s.id])
.map((s) => s.name);

View File

@@ -27,6 +27,7 @@ export function clearUserState() {
state.counts = null;
state.mySuggestions = [];
state.allSuggestions = [];
state.allSuggestionsSig = null;
state.myVotes = [];
state.results = [];
state.votesRendered = false;