fix: broken neutral button
This commit is contained in:
parent
ac531cd3e8
commit
fd8dd26435
3 changed files with 5 additions and 6 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -989,6 +989,5 @@ Non quae tempore quo provident laudantium qui illo dolor vel quia dolor et exerc
|
|||
<string name="reply">Reply</string>
|
||||
<string name="replies">Replies</string>
|
||||
<string name="open_rules">Open Rules</string>
|
||||
<string name="i_understand">I understand</string>
|
||||
<string name="post_to_anilist_warning">By posting to AniList, you agree to the rules and guidelines of AniList</string>
|
||||
</resources>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue