Minor cleanup

This commit is contained in:
Jobobby04
2023-12-24 14:28:39 -05:00
parent 7f89587889
commit c36d2794bb
25 changed files with 166 additions and 63 deletions
@@ -40,7 +40,7 @@ abstract class HttpSource : CatalogueSource {
// SY -->
protected val network: NetworkHelper by lazy {
val network = Injekt.get<NetworkHelper>()
object : NetworkHelper(Injekt.get<Application>(), Injekt.get()) {
object : NetworkHelper(Injekt.get<Application>(), Injekt.get(), network.isDebugBuild) {
override val client: OkHttpClient
get() = delegate?.networkHttpClient ?: network.client
.newBuilder()
@@ -106,7 +106,9 @@ class EHentaiSearchMetadata : RaisedSearchMetadata() {
getItem(visible) { stringResource(SYMR.strings.visible) },
getItem(language) { stringResource(SYMR.strings.language) },
getItem(translated) { stringResource(SYMR.strings.translated) },
getItem(size, { MetadataUtil.humanReadableByteCount(it, true) }) { stringResource(SYMR.strings.gallery_size) },
getItem(size, { MetadataUtil.humanReadableByteCount(it, true) }) {
stringResource(SYMR.strings.gallery_size)
},
getItem(length) { stringResource(SYMR.strings.page_count) },
getItem(favorites) { stringResource(SYMR.strings.total_favorites) },
getItem(ratingCount) { stringResource(SYMR.strings.total_ratings) },
@@ -44,7 +44,9 @@ class EightMusesSearchMetadata : RaisedSearchMetadata() {
return with(context) {
listOfNotNull(
getItem(title) { stringResource(MR.strings.title) },
getItem(path.nullIfEmpty(), { it.joinToString("/", prefix = "/") }) { stringResource(SYMR.strings.path) },
getItem(path.nullIfEmpty(), { it.joinToString("/", prefix = "/") }) {
stringResource(SYMR.strings.path)
},
getItem(thumbnailUrl) { stringResource(SYMR.strings.thumbnail_url) },
)
}