Use XLog in more places
This commit is contained in:
parent
bd6e048108
commit
11fbc1faf9
@ -1,6 +1,7 @@
|
||||
package exh.debug
|
||||
|
||||
import android.app.Application
|
||||
import com.elvishew.xlog.XLog
|
||||
import com.github.salomonbrys.kotson.array
|
||||
import com.github.salomonbrys.kotson.jsonObject
|
||||
import com.github.salomonbrys.kotson.obj
|
||||
@ -30,7 +31,6 @@ import kotlinx.coroutines.flow.asFlow
|
||||
import kotlinx.coroutines.flow.mapNotNull
|
||||
import kotlinx.coroutines.flow.toList
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import timber.log.Timber
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
import xyz.nulldev.ts.api.http.serializer.FilterSerializer
|
||||
import java.lang.RuntimeException
|
||||
@ -254,7 +254,7 @@ object DebugFunctions {
|
||||
)
|
||||
} catch (t: RuntimeException) {
|
||||
// Load failed
|
||||
Timber.e(t, "Failed to load saved search!")
|
||||
XLog.e("Failed to load saved search!", t)
|
||||
t.printStackTrace()
|
||||
null
|
||||
}
|
||||
@ -274,7 +274,7 @@ object DebugFunctions {
|
||||
)
|
||||
} catch (t: RuntimeException) {
|
||||
// Load failed
|
||||
Timber.e(t, "Failed to load saved search!")
|
||||
XLog.e("Failed to load saved search!", t)
|
||||
t.printStackTrace()
|
||||
null
|
||||
}
|
||||
@ -314,7 +314,7 @@ object DebugFunctions {
|
||||
)
|
||||
} catch (t: RuntimeException) {
|
||||
// Load failed
|
||||
Timber.e(t, "Failed to load saved search!")
|
||||
XLog.e("Failed to load saved search!", t)
|
||||
t.printStackTrace()
|
||||
null
|
||||
}
|
||||
@ -334,7 +334,7 @@ object DebugFunctions {
|
||||
)
|
||||
} catch (t: RuntimeException) {
|
||||
// Load failed
|
||||
Timber.e(t, "Failed to load saved search!")
|
||||
XLog.e("Failed to load saved search!", t)
|
||||
t.printStackTrace()
|
||||
null
|
||||
}
|
||||
|
@ -4,11 +4,11 @@ import android.app.Dialog
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.elvishew.xlog.XLog
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.ui.base.controller.DialogController
|
||||
import eu.kanade.tachiyomi.util.lang.launchUI
|
||||
import eu.kanade.tachiyomi.util.system.toast
|
||||
import timber.log.Timber
|
||||
import kotlin.concurrent.thread
|
||||
|
||||
class ConfiguringDialogController : DialogController() {
|
||||
@ -32,7 +32,7 @@ class ConfiguringDialogController : DialogController() {
|
||||
.show()
|
||||
}
|
||||
}
|
||||
Timber.e(e, "Configuration error!")
|
||||
XLog.e("Configuration error!", e)
|
||||
}
|
||||
launchUI {
|
||||
finish()
|
||||
|
@ -1,6 +1,7 @@
|
||||
package exh.uconfig
|
||||
|
||||
import android.content.Context
|
||||
import com.elvishew.xlog.XLog
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||
import eu.kanade.tachiyomi.source.SourceManager
|
||||
@ -12,7 +13,6 @@ import exh.log.maybeInjectEHLogger
|
||||
import okhttp3.FormBody
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Request
|
||||
import timber.log.Timber
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
|
||||
class EHConfigurator(val context: Context) {
|
||||
@ -79,7 +79,7 @@ class EHConfigurator(val context: Context) {
|
||||
}
|
||||
}
|
||||
|
||||
Timber.d("Hath perks: $hathPerks")
|
||||
XLog.nst().d("Hath perks: $hathPerks")
|
||||
|
||||
configure(ehSource, hathPerks)
|
||||
configure(exhSource, hathPerks)
|
||||
|
@ -12,6 +12,7 @@ import android.webkit.WebChromeClient
|
||||
import android.webkit.WebView
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.elvishew.xlog.XLog
|
||||
import com.github.salomonbrys.kotson.get
|
||||
import com.github.salomonbrys.kotson.string
|
||||
import com.google.gson.JsonParser
|
||||
@ -35,7 +36,6 @@ import okhttp3.RequestBody.Companion.toRequestBody
|
||||
import rx.Observable
|
||||
import rx.Single
|
||||
import rx.schedulers.Schedulers
|
||||
import timber.log.Timber
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
import java.io.Serializable
|
||||
import java.net.URL
|
||||
@ -179,7 +179,7 @@ class BrowserActionActivity : AppCompatActivity() {
|
||||
fun captchaSolveFail() {
|
||||
currentLoopId = null
|
||||
validateCurrentLoopId = null
|
||||
Timber.e(IllegalStateException("Captcha solve failure!"))
|
||||
XLog.e(IllegalStateException("Captcha solve failure!"))
|
||||
runOnUiThread {
|
||||
webview.evaluateJavascript(SOLVE_UI_SCRIPT_HIDE, null)
|
||||
MaterialDialog(this)
|
||||
@ -223,7 +223,7 @@ class BrowserActionActivity : AppCompatActivity() {
|
||||
val ih = splitResult[3]
|
||||
val x = webview.x + origX / iw * webview.width
|
||||
val y = webview.y + origY / ih * webview.height
|
||||
Timber.d("Found audio button coords: %f %f", x, y)
|
||||
XLog.nst().d("Found audio button coords: %f %f", x, y)
|
||||
simulateClick(x + 50, y + 50)
|
||||
webview.post {
|
||||
doStageDownloadAudio(loopId)
|
||||
@ -239,12 +239,12 @@ class BrowserActionActivity : AppCompatActivity() {
|
||||
}
|
||||
STAGE_DOWNLOAD_AUDIO -> {
|
||||
if (result != null) {
|
||||
Timber.d("Got audio URL: $result")
|
||||
XLog.nst().d("Got audio URL: $result")
|
||||
performRecognize(result)
|
||||
.observeOn(Schedulers.io())
|
||||
.subscribe(
|
||||
{
|
||||
Timber.d("Got audio transcript: $it")
|
||||
XLog.nst().d("Got audio transcript: $it")
|
||||
webview.post {
|
||||
typeResult(
|
||||
loopId,
|
||||
@ -457,7 +457,7 @@ class BrowserActionActivity : AppCompatActivity() {
|
||||
if (loopId != validateCurrentLoopId) return
|
||||
|
||||
if (result) {
|
||||
Timber.d("Captcha solved!")
|
||||
XLog.nst().d("Captcha solved!")
|
||||
webview.post {
|
||||
webview.evaluateJavascript(SOLVE_UI_SCRIPT_HIDE, null)
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import android.webkit.CookieManager
|
||||
import android.webkit.WebView
|
||||
import android.webkit.WebViewClient
|
||||
import androidx.core.view.isVisible
|
||||
import com.elvishew.xlog.XLog
|
||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||
import eu.kanade.tachiyomi.databinding.EhActivityLoginBinding
|
||||
import eu.kanade.tachiyomi.source.SourceManager
|
||||
@ -15,7 +16,6 @@ import eu.kanade.tachiyomi.ui.base.controller.NucleusController
|
||||
import eu.kanade.tachiyomi.util.lang.launchUI
|
||||
import eu.kanade.tachiyomi.util.system.setDefaultSettings
|
||||
import exh.uconfig.WarnConfigureDialogController
|
||||
import timber.log.Timber
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
import java.net.HttpCookie
|
||||
|
||||
@ -90,7 +90,7 @@ class LoginController : NucleusController<EhActivityLoginBinding, LoginPresenter
|
||||
binding.webview.webViewClient = object : WebViewClient() {
|
||||
override fun onPageFinished(view: WebView, url: String) {
|
||||
super.onPageFinished(view, url)
|
||||
Timber.d(url)
|
||||
XLog.nst().d(url)
|
||||
val parsedUrl = Uri.parse(url)
|
||||
if (parsedUrl.host.equals("forums.e-hentai.org", ignoreCase = true)) {
|
||||
// Hide distracting content
|
||||
|
@ -1,6 +1,7 @@
|
||||
package exh.ui.metadata
|
||||
|
||||
import android.os.Bundle
|
||||
import com.elvishew.xlog.XLog
|
||||
import eu.kanade.tachiyomi.data.database.DatabaseHelper
|
||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||
@ -11,7 +12,6 @@ import exh.metadata.metadata.base.RaisedSearchMetadata
|
||||
import exh.metadata.metadata.base.getFlatMetadataForManga
|
||||
import rx.Observable
|
||||
import rx.android.schedulers.AndroidSchedulers
|
||||
import timber.log.Timber
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
|
||||
@ -27,7 +27,7 @@ class MetadataViewPresenter(
|
||||
override fun onCreate(savedState: Bundle?) {
|
||||
super.onCreate(savedState)
|
||||
|
||||
getMangaMetaObservable().subscribeLatestCache({ view, flatMetadata -> if (flatMetadata != null) view.onNextMetaInfo(flatMetadata) else Timber.d("Invalid metadata") })
|
||||
getMangaMetaObservable().subscribeLatestCache({ view, flatMetadata -> if (flatMetadata != null) view.onNextMetaInfo(flatMetadata) else XLog.nst().d("Invalid metadata") })
|
||||
|
||||
getMangaObservable()
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
|
Loading…
x
Reference in New Issue
Block a user