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 {
|
fun setNeutralButton(title: String?, onClick: (() -> Unit)? = null): AlertDialogBuilder {
|
||||||
this.negButtonTitle = title
|
this.neutralButtonTitle = title
|
||||||
this.onNegativeButtonClick = onClick
|
this.onNeutralButtonClick = onClick
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,8 +89,8 @@ class AlertDialogBuilder(private val context: Context) {
|
||||||
formatArgs: Int? = null,
|
formatArgs: Int? = null,
|
||||||
onClick: (() -> Unit)? = null
|
onClick: (() -> Unit)? = null
|
||||||
): AlertDialogBuilder {
|
): AlertDialogBuilder {
|
||||||
this.negButtonTitle = context.getString(int, formatArgs)
|
this.neutralButtonTitle = context.getString(int, formatArgs)
|
||||||
this.onNegativeButtonClick = onClick
|
this.onNeutralButtonClick = onClick
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ class MarkdownCreatorActivity : AppCompatActivity() {
|
||||||
AlertDialogBuilder(this).apply {
|
AlertDialogBuilder(this).apply {
|
||||||
setTitle(R.string.warning)
|
setTitle(R.string.warning)
|
||||||
setMessage(R.string.post_to_anilist_warning)
|
setMessage(R.string.post_to_anilist_warning)
|
||||||
setPosButton(R.string.i_understand) {
|
setPosButton(R.string.ok) {
|
||||||
launchIO {
|
launchIO {
|
||||||
val success = when (type) {
|
val success = when (type) {
|
||||||
"activity" -> Anilist.mutation.postActivity(text)
|
"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="reply">Reply</string>
|
||||||
<string name="replies">Replies</string>
|
<string name="replies">Replies</string>
|
||||||
<string name="open_rules">Open Rules</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>
|
<string name="post_to_anilist_warning">By posting to AniList, you agree to the rules and guidelines of AniList</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue