diff --git a/app/src/main/java/me/iacn/biliroaming/utils/Log.kt b/app/src/main/java/me/iacn/biliroaming/utils/Log.kt index 2642534c3e..f43eb122ce 100644 --- a/app/src/main/java/me/iacn/biliroaming/utils/Log.kt +++ b/app/src/main/java/me/iacn/biliroaming/utils/Log.kt @@ -12,11 +12,13 @@ import android.util.Log as ALog object Log { private val handler by lazy { Handler(Looper.getMainLooper()) } + private val toast by lazy { Toast.makeText(currentContext, "", Toast.LENGTH_SHORT) } fun toast(msg: String, force: Boolean = false) { if (!force && !sPrefs.getBoolean("show_info", true)) return handler.post { - Toast.makeText(currentContext, "哔哩漫游:$msg", Toast.LENGTH_SHORT).show() + toast.setText("哔哩漫游:$msg") + toast.show() } }