imp: use display categories for modrinth tag display (#5160)
This commit is contained in:
@@ -576,6 +576,9 @@ public final class ModrinthRemoteModRepository implements RemoteModRepository {
|
|||||||
|
|
||||||
private final List<String> categories;
|
private final List<String> categories;
|
||||||
|
|
||||||
|
@SerializedName("display_categories")
|
||||||
|
private final List<String> displayCategories;
|
||||||
|
|
||||||
@SerializedName("project_type")
|
@SerializedName("project_type")
|
||||||
private final String projectType;
|
private final String projectType;
|
||||||
|
|
||||||
@@ -600,11 +603,12 @@ public final class ModrinthRemoteModRepository implements RemoteModRepository {
|
|||||||
@SerializedName("latest_version")
|
@SerializedName("latest_version")
|
||||||
private final String latestVersion;
|
private final String latestVersion;
|
||||||
|
|
||||||
public ProjectSearchResult(String slug, String title, String description, List<String> categories, String projectType, int downloads, String iconUrl, String projectId, String author, List<String> versions, Instant dateCreated, Instant dateModified, String latestVersion) {
|
public ProjectSearchResult(String slug, String title, String description, List<String> categories, List<String> displayCategories, String projectType, int downloads, String iconUrl, String projectId, String author, List<String> versions, Instant dateCreated, Instant dateModified, String latestVersion) {
|
||||||
this.slug = slug;
|
this.slug = slug;
|
||||||
this.title = title;
|
this.title = title;
|
||||||
this.description = description;
|
this.description = description;
|
||||||
this.categories = categories;
|
this.categories = categories;
|
||||||
|
this.displayCategories = displayCategories;
|
||||||
this.projectType = projectType;
|
this.projectType = projectType;
|
||||||
this.downloads = downloads;
|
this.downloads = downloads;
|
||||||
this.iconUrl = iconUrl;
|
this.iconUrl = iconUrl;
|
||||||
@@ -632,6 +636,10 @@ public final class ModrinthRemoteModRepository implements RemoteModRepository {
|
|||||||
return categories;
|
return categories;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<String> getDisplayCategories() {
|
||||||
|
return displayCategories;
|
||||||
|
}
|
||||||
|
|
||||||
public String getProjectType() {
|
public String getProjectType() {
|
||||||
return projectType;
|
return projectType;
|
||||||
}
|
}
|
||||||
@@ -691,7 +699,7 @@ public final class ModrinthRemoteModRepository implements RemoteModRepository {
|
|||||||
author,
|
author,
|
||||||
title,
|
title,
|
||||||
description,
|
description,
|
||||||
categories,
|
displayCategories,
|
||||||
String.format("https://modrinth.com/%s/%s", projectType, projectId),
|
String.format("https://modrinth.com/%s/%s", projectType, projectId),
|
||||||
iconUrl,
|
iconUrl,
|
||||||
this
|
this
|
||||||
|
|||||||
Reference in New Issue
Block a user