debug: Verbose logging for FlexibleAdapter

This commit is contained in:
Ahmad Ansori Palembani 2024-12-20 13:19:36 +07:00
parent 8ac8187977
commit b974eff320
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6

View file

@ -34,6 +34,8 @@ import coil3.util.DebugLogger
import com.google.firebase.crashlytics.ktx.crashlytics
import com.google.firebase.ktx.Firebase
import com.hippo.unifile.UniFile
import eu.davidea.flexibleadapter.FlexibleAdapter
import eu.davidea.flexibleadapter.utils.Log.Level
import eu.kanade.tachiyomi.appwidget.TachiyomiWidgetManager
import eu.kanade.tachiyomi.core.preference.Preference
import eu.kanade.tachiyomi.core.preference.PreferenceStore
@ -139,6 +141,12 @@ open class App : Application(), DefaultLifecycleObserver, SingletonImageLoader.F
.onEach { ImageUtil.hardwareBitmapThreshold = it }
.launchIn(scope)
networkPreferences.verboseLogging().changes()
.onEach { enabled ->
FlexibleAdapter.enableLogs(if (enabled) Level.VERBOSE else Level.SUPPRESS)
}
.launchIn(scope)
scope.launchIO {
with(TachiyomiWidgetManager()) { this@App.init() }
}