Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
1.0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaowine committed Aug 26, 2023
1 parent 4bf1ae6 commit 5c6f0e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion xkt/src/main/java/cn/xiaowine/xkt/AcTool.kt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ object AcTool {
* @param predicate [Boolean] 显示条件,为false时不显示,默认null
* @return [T] 返回自身
*/
fun <T> T?.showToast(duration: Int = Toast.LENGTH_SHORT, predicate: (() -> Boolean)?): T? {
fun <T> T?.showToast(duration: Int = Toast.LENGTH_SHORT, predicate: (() -> Boolean)? = null): T? {
if (predicate?.invoke() == false) return this
handler.post {
Toast.makeText(context, this.toString(), duration).show()
Expand Down
2 changes: 1 addition & 1 deletion xkt/src/main/java/cn/xiaowine/xkt/LogTool.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ object LogTool {
* @param predicate [Unit] 显示条件
* @param printXp [Boolean] 是否打印到Xposed日志
*/
fun init(tag: String, predicate: (() -> Boolean)?, printXp: Boolean = false, maxLength: Int = 4000) {
fun init(tag: String, predicate: (() -> Boolean)?= null, printXp: Boolean = false, maxLength: Int = 4000) {
this.tag = tag
this.printXp = printXp
this.predicate = predicate?.invoke() ?: true
Expand Down

0 comments on commit 5c6f0e9

Please sign in to comment.