Optimize imports, disallow wildcard imports because of klint, run linter
This commit is contained in:
@@ -9,17 +9,17 @@ class CrashlyticsPrinter(private val logLevel: Int) : Printer {
|
||||
* Print log in new line.
|
||||
*
|
||||
* @param logLevel the level of log
|
||||
* @param tag the tag of log
|
||||
* @param msg the msg of log
|
||||
* @param tag the tag of log
|
||||
* @param msg the msg of log
|
||||
*/
|
||||
override fun println(logLevel: Int, tag: String?, msg: String?) {
|
||||
if(logLevel >= this.logLevel) {
|
||||
if (logLevel >= this.logLevel) {
|
||||
try {
|
||||
Crashlytics.log(logLevel, tag, msg)
|
||||
} catch (t: Throwable) {
|
||||
// Crash in debug if shit like this happens
|
||||
if(BuildConfig.DEBUG) throw t
|
||||
if (BuildConfig.DEBUG) throw t
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,11 +4,11 @@ import android.content.Context
|
||||
import android.text.Html
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import com.ms_square.debugoverlay.DataObserver
|
||||
import com.ms_square.debugoverlay.OverlayModule
|
||||
import eu.kanade.tachiyomi.BuildConfig
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||
import eu.kanade.tachiyomi.data.preference.getOrDefault
|
||||
@@ -61,5 +61,5 @@ class EHDebugModeOverlay(private val context: Context) : OverlayModule<String>(n
|
||||
<b>Source blacklist:</b> ${prefs.eh_enableSourceBlacklist().getOrDefault().asEnabledString()}
|
||||
""".trimIndent()
|
||||
|
||||
private fun Boolean.asEnabledString() = if(this) "enabled" else "disabled"
|
||||
}
|
||||
private fun Boolean.asEnabledString() = if (this) "enabled" else "disabled"
|
||||
}
|
||||
|
||||
@@ -23,4 +23,4 @@ enum class EHLogLevel(val description: String) {
|
||||
return curLogLevel!! >= requiredLogLevel.ordinal
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package exh.log
|
||||
|
||||
import okhttp3.OkHttpClient
|
||||
|
||||
fun OkHttpClient.Builder.maybeInjectEHLogger(): OkHttpClient.Builder { //TODO - un-break this
|
||||
fun OkHttpClient.Builder.maybeInjectEHLogger(): OkHttpClient.Builder { // TODO - un-break this
|
||||
/* if(false &&EHLogLevel.shouldLog(EHLogLevel.EXTREME)) {
|
||||
val xLogger = XLog.tag("EHNetwork")
|
||||
.nst()
|
||||
|
||||
Reference in New Issue
Block a user