fix: broken neutral button

This commit is contained in:
rebelonion 2024-05-16 10:13:46 -05:00
parent ac531cd3e8
commit fd8dd26435
3 changed files with 5 additions and 6 deletions

View file

@ -79,8 +79,8 @@ class AlertDialogBuilder(private val context: Context) {
}
fun setNeutralButton(title: String?, onClick: (() -> Unit)? = null): AlertDialogBuilder {
this.negButtonTitle = title
this.onNegativeButtonClick = onClick
this.neutralButtonTitle = title
this.onNeutralButtonClick = onClick
return this
}
@ -89,8 +89,8 @@ class AlertDialogBuilder(private val context: Context) {
formatArgs: Int? = null,
onClick: (() -> Unit)? = null
): AlertDialogBuilder {
this.negButtonTitle = context.getString(int, formatArgs)
this.onNegativeButtonClick = onClick
this.neutralButtonTitle = context.getString(int, formatArgs)
this.onNeutralButtonClick = onClick
return this
}

View file

@ -84,7 +84,7 @@ class MarkdownCreatorActivity : AppCompatActivity() {
AlertDialogBuilder(this).apply {
setTitle(R.string.warning)
setMessage(R.string.post_to_anilist_warning)
setPosButton(R.string.i_understand) {
setPosButton(R.string.ok) {
launchIO {
val success = when (type) {
"activity" -> Anilist.mutation.postActivity(text)