Skip to content

Commit

Permalink
Revert c471926
Browse files Browse the repository at this point in the history
  • Loading branch information
yujincheng08 committed Mar 20, 2021
1 parent 985a513 commit bbf45ee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/main/java/me/iacn/biliroaming/utils/Log.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}

Expand Down

0 comments on commit bbf45ee

Please sign in to comment.