upvoting suppression by local storage now works, there is a bug however with the entries loaded o startup

This commit is contained in:
J-Klinke
2024-07-03 11:27:49 +02:00
parent 20eda5931a
commit 6d34b8c388
3 changed files with 16 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
import {searchBarTimeout, searchSection, lastQuery, votedIDs} from "./main.js"
import {searchBarTimeout, searchSection, lastQuery} from "./main.js"
import Dataset from "./dataset.js"
export function fetchQuery(fetchString, clearResults) {
@@ -24,12 +24,9 @@ function parseContent(content, clearResults) {
Array.from(searchSection.querySelectorAll(".datasets .dataset")).forEach(e => e.remove());
}
for (const dataset of datasets) {
if (votedIDs.has(dataset.getID())) {
searchSection.querySelector(".datasets").appendChild(dataset.createDatasetHTMLElement(false,));
} else {
searchSection.querySelector(".datasets").appendChild(dataset.createDatasetHTMLElement());
}
console.log(dataset) //TODO: remove
searchSection.querySelector(".datasets")
.appendChild(dataset.createDatasetHTMLElement(dataset.getID()));
}
}
}