From ab46a7713f7a02493b2a0efee350f360c972b481 Mon Sep 17 00:00:00 2001 From: gedoor Date: Thu, 12 Nov 2020 08:55:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/lib/dialogs/AlertBuilder.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/io/legado/app/lib/dialogs/AlertBuilder.kt b/app/src/main/java/io/legado/app/lib/dialogs/AlertBuilder.kt index 27129c7cf..6a245e5fb 100644 --- a/app/src/main/java/io/legado/app/lib/dialogs/AlertBuilder.kt +++ b/app/src/main/java/io/legado/app/lib/dialogs/AlertBuilder.kt @@ -96,23 +96,23 @@ interface AlertBuilder { fun show(): D - fun AlertBuilder<*>.customTitle(view: () -> View) { + fun customTitle(view: () -> View) { customTitle = view() } - fun AlertBuilder<*>.customView(view: () -> View) { + fun customView(view: () -> View) { customView = view() } - fun AlertBuilder<*>.okButton(handler: ((dialog: DialogInterface) -> Unit)? = null) = + fun okButton(handler: ((dialog: DialogInterface) -> Unit)? = null) = positiveButton(android.R.string.ok, handler) - fun AlertBuilder<*>.cancelButton(handler: ((dialog: DialogInterface) -> Unit)? = null) = + fun cancelButton(handler: ((dialog: DialogInterface) -> Unit)? = null) = negativeButton(android.R.string.cancel, handler) - fun AlertBuilder<*>.yesButton(handler: ((dialog: DialogInterface) -> Unit)? = null) = + fun yesButton(handler: ((dialog: DialogInterface) -> Unit)? = null) = positiveButton(R.string.yes, handler) - fun AlertBuilder<*>.noButton(handler: ((dialog: DialogInterface) -> Unit)? = null) = + fun noButton(handler: ((dialog: DialogInterface) -> Unit)? = null) = negativeButton(R.string.no, handler) }