Minor cleanup

This commit is contained in:
Jobobby04 2022-12-03 19:23:50 -05:00
parent c6af0456ed
commit 7273e48960
2 changed files with 1 additions and 3 deletions

View File

@ -57,8 +57,6 @@ class UnsortedPreferences(
fun exhShowSettingsUploadWarning() = preferenceStore.getBoolean("eh_showSettingsUploadWarning2", true) fun exhShowSettingsUploadWarning() = preferenceStore.getBoolean("eh_showSettingsUploadWarning2", true)
fun autoSolveCaptcha() = preferenceStore.getBoolean("eh_autosolve_captchas", false)
fun logLevel() = preferenceStore.getInt("eh_log_level", 0) fun logLevel() = preferenceStore.getInt("eh_log_level", 0)
fun exhAutoUpdateFrequency() = preferenceStore.getInt("eh_auto_update_frequency", 1) fun exhAutoUpdateFrequency() = preferenceStore.getInt("eh_auto_update_frequency", 1)

View File

@ -40,7 +40,7 @@ class Pururin(delegate: HttpSource, val context: Context) :
// Support direct URL importing // Support direct URL importing
override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable<MangasPage> { override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable<MangasPage> {
val trimmedIdQuery = query.trim().removePrefix("id:") val trimmedIdQuery = query.trim().removePrefix("id:")
val newQuery = if (trimmedIdQuery.toIntOrNull() ?: -1 >= 0) { val newQuery = if ((trimmedIdQuery.toIntOrNull() ?: -1) >= 0) {
"$baseUrl/gallery/$trimmedIdQuery/-" "$baseUrl/gallery/$trimmedIdQuery/-"
} else { } else {
query query