mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 14:20:42 +08:00
Fix commit listing, adding new commits to list instead of replacing
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
} from "@http-client";
|
||||
import type { ProjectRoute } from "./router";
|
||||
|
||||
import { COMMITS_PER_PAGE } from "./router";
|
||||
import config from "virtual:config";
|
||||
import { HttpdClient } from "@http-client";
|
||||
import { baseUrlToString } from "@app/lib/utils";
|
||||
import { groupCommits } from "@app/lib/commit";
|
||||
@@ -58,9 +58,9 @@
|
||||
const response = await api.project.getAllCommits(project.id, {
|
||||
parent: allCommitHeaders[0].id,
|
||||
page,
|
||||
perPage: COMMITS_PER_PAGE,
|
||||
perPage: config.source.commitsPerPage,
|
||||
});
|
||||
allCommitHeaders = response;
|
||||
allCommitHeaders = [...allCommitHeaders, ...response];
|
||||
} catch (e) {
|
||||
error = e;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@ import { handleError, unreachableError } from "@app/views/projects/error";
|
||||
import { HttpdClient } from "@http-client";
|
||||
import { ResponseError, ResponseParseError } from "@http-client/lib/fetcher";
|
||||
|
||||
export const COMMITS_PER_PAGE = 30;
|
||||
export const PATCHES_PER_PAGE = 10;
|
||||
export const ISSUES_PER_PAGE = 10;
|
||||
|
||||
@@ -524,7 +523,7 @@ async function loadHistoryView(
|
||||
await api.project.getAllCommits(project.id, {
|
||||
parent: commitId,
|
||||
page: 0,
|
||||
perPage: COMMITS_PER_PAGE,
|
||||
perPage: config.source.commitsPerPage,
|
||||
}),
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user