Stop vote card refresh during slider drag
This commit is contained in:
@@ -103,8 +103,10 @@ async function loadRevealData() {
|
||||
|
||||
async function loadVoteData() {
|
||||
if (state.phase !== "Vote") return;
|
||||
state.myVotes = await api.myVotes();
|
||||
renderVotes();
|
||||
// avoid re-rendering vote cards mid-drag: only update scores map
|
||||
const votes = await api.myVotes();
|
||||
state.myVotes = votes;
|
||||
syncVoteScores();
|
||||
}
|
||||
|
||||
async function loadResults() {
|
||||
@@ -378,7 +380,11 @@ async function adminAction(fn, successMessage) {
|
||||
async function refreshPhaseData() {
|
||||
try {
|
||||
await loadState();
|
||||
await Promise.all([loadSuggestData(), loadRevealData(), loadVoteData(), loadResults()]);
|
||||
await Promise.all([loadSuggestData(), loadRevealData(), loadResults()]);
|
||||
// vote data only refreshes via explicit calls to avoid interrupting slider drags
|
||||
if (state.phase !== "Vote") {
|
||||
await loadVoteData();
|
||||
}
|
||||
} catch (err) {
|
||||
if (handleAuthError(err)) return;
|
||||
throw err;
|
||||
|
||||
Reference in New Issue
Block a user