Fix custom dc

This commit is contained in:
世界 2020-10-25 13:26:45 +00:00
parent 03b1017a31
commit 132ff01750
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
2 changed files with 6 additions and 2 deletions

View File

@ -860,6 +860,10 @@ public class LoginActivity extends BaseFragment implements NotificationCenter.No
return Unit.INSTANCE;
} else {
builder.dismiss();
}
}

View File

@ -248,7 +248,7 @@ class BottomBuilder(val ctx: Context) {
}
@JvmOverloads
fun addButton(text: String, red: Boolean = false, left: Boolean = false, listener: ((TextView) -> Unit)): TextView {
fun addButton(text: String, noAutoDismiss: Boolean = false, left: Boolean = false, listener: ((TextView) -> Unit)): TextView {
return TextView(ctx).apply {
@ -262,7 +262,7 @@ class BottomBuilder(val ctx: Context) {
setText(text)
typeface = AndroidUtilities.getTypeface("fonts/rmedium.ttf")
(if (left) buttonsView else rightButtonsView).addView(this, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.TOP or Gravity.LEFT))
setOnClickListener { dismiss();listener(this) }
setOnClickListener { if (!noAutoDismiss) dismiss();listener(this) }
}