mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-16 17:24:07 -05:00
add size field to Category data class (#519)
Makes it possible to display the size of a category to the user
This commit is contained in:
@@ -12,5 +12,6 @@ data class CategoryDataClass(
|
||||
val order: Int,
|
||||
val name: String,
|
||||
val default: Boolean,
|
||||
val size: Int,
|
||||
val meta: Map<String, String> = emptyMap()
|
||||
)
|
||||
|
||||
@@ -23,5 +23,6 @@ fun CategoryTable.toDataClass(categoryEntry: ResultRow) = CategoryDataClass(
|
||||
categoryEntry[order],
|
||||
categoryEntry[name],
|
||||
categoryEntry[isDefault],
|
||||
Category.getCategorySize(categoryEntry[id].value),
|
||||
Category.getCategoryMetaMap(categoryEntry[id].value)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user