1
0

Refactor pagination in renderer.js to support page parameter

This commit is contained in:
2025-05-26 20:55:54 +02:00
parent 58b9632fb1
commit 0d6d663883

View File

@@ -496,14 +496,15 @@ async function startLiveCountdown(folderObj, msLeft) {
contentList.parentElement.insertBefore(paginationEl, contentList); // einmalig nach DOM load
async function renderContent(folderObj) {
async function renderContent(folderObj, page = 1) {
closeDropdown();
const folder = folderObj.path;
await updateInteractionBar(folderObj);
titleEl.textContent = folder;
const { head, commits } = await window.electronAPI.getCommits(folderObj);
// Holt die paginierten Commits!
const { head, commits, total, page: currentPage, pageSize, pages } =
await window.electronAPI.getCommits(folderObj, page, PAGE_SIZE);
commitPage = currentPage; // speichere aktuelle Seite