mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-10 10:20:44 -07:00
Fetch up to 100 results... and fix the layout when filtering
This commit is contained in:
parent
5dd299ecdd
commit
3fae644550
2 changed files with 23 additions and 22 deletions
|
|
@ -29,7 +29,7 @@ object GitLabPluginFetcher {
|
|||
try {
|
||||
debugLog("Starting to fetch GitLab plugins...")
|
||||
val plugins = mutableListOf<GitLabPlugin>()
|
||||
val apiUrl = "https://gitlab.com/api/v4/projects/${GITLAB_PROJECT_ID}/repository/tree?ref=${GITLAB_BRANCH}"
|
||||
val apiUrl = "https://gitlab.com/api/v4/projects/${GITLAB_PROJECT_ID}/repository/tree?ref=${GITLAB_BRANCH}&per_page=100"
|
||||
debugLog("API URL: $apiUrl")
|
||||
|
||||
// Create URL connection
|
||||
|
|
@ -54,10 +54,10 @@ object GitLabPluginFetcher {
|
|||
val treeItems = gson.fromJson(response, Array<JsonObject>::class.java)
|
||||
debugLog("Parsed ${treeItems.size} items from JSON")
|
||||
|
||||
// Filter for directories (trees)
|
||||
// Filter for directories (trees) with mode "040000"
|
||||
var directoryCount = 0
|
||||
for (jsonObject in treeItems) {
|
||||
if (jsonObject["type"].asString == "tree") {
|
||||
if (jsonObject["type"].asString == "tree" && jsonObject["mode"].asString == "040000") {
|
||||
directoryCount++
|
||||
val folderId = jsonObject["id"].asString
|
||||
val folderPath = jsonObject["path"].asString
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue