MangaDex: Add Sort by Rating (#12204)

* Add Sort by Rating to MangaDex Browse

* Increment mangadex.extVersionCode

* Add Portuguese translations for "Rating"

Co-authored-by: Alessandro Jean
<14254807+alessandrojean@users.noreply.github.com>
This commit is contained in:
nicki 2022-06-15 19:42:11 +05:30 committed by GitHub
parent a3ef42b007
commit a552234fd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 2 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'MangaDex'
pkgNameSuffix = 'all.mangadex'
extClass = '.MangaDexFactory'
extVersionCode = 164
extVersionCode = 165
isNsfw = true
}

View File

@ -170,7 +170,8 @@ class MangaDexFilters {
Sortable(intl.sortContentCreatedAt, "createdAt"),
Sortable(intl.sortContentInfoUpdatedAt, "updatedAt"),
Sortable(intl.sortRelevance, "relevance"),
Sortable(intl.sortYear, "year")
Sortable(intl.sortYear, "year"),
Sortable(intl.sortRating, "rating")
)
class SortFilter(intl: MangaDexIntl, private val sortables: Array<Sortable>) :

View File

@ -620,6 +620,11 @@ class MangaDexIntl(val lang: String) {
else -> "Year"
}
val sortRating: String = when (availableLang) {
BRAZILIAN_PORTUGUESE, PORTUGUESE -> "Nota"
else -> "Rating"
}
val hasAvailableChapters: String = when (availableLang) {
BRAZILIAN_PORTUGUESE, PORTUGUESE -> "Há capítulos disponíveis"
else -> "Has available chapters"