add ktlint plugin to project and apply default code style (#2209)
* add ktlint plugin to project and apply default code style * some manual adjustments, fix wildcard imports * update CONTRIBUTING.md * fix formatting
This commit is contained in:
parent
955267199e
commit
16ffcca748
227 changed files with 3933 additions and 3371 deletions
|
|
@ -17,20 +17,20 @@ fun showMuteAccountDialog(
|
|||
binding.checkbox.isChecked = true
|
||||
|
||||
AlertDialog.Builder(activity)
|
||||
.setView(binding.root)
|
||||
.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
val durationValues = activity.resources.getIntArray(R.array.mute_duration_values)
|
||||
.setView(binding.root)
|
||||
.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
val durationValues = activity.resources.getIntArray(R.array.mute_duration_values)
|
||||
|
||||
// workaround to make indefinite muting work with Mastodon 3.3.0
|
||||
// https://github.com/tuskyapp/Tusky/issues/2107
|
||||
val duration = if(binding.duration.selectedItemPosition == 0) {
|
||||
null
|
||||
} else {
|
||||
durationValues[binding.duration.selectedItemPosition]
|
||||
}
|
||||
|
||||
onOk(binding.checkbox.isChecked, duration)
|
||||
// workaround to make indefinite muting work with Mastodon 3.3.0
|
||||
// https://github.com/tuskyapp/Tusky/issues/2107
|
||||
val duration = if (binding.duration.selectedItemPosition == 0) {
|
||||
null
|
||||
} else {
|
||||
durationValues[binding.duration.selectedItemPosition]
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.show()
|
||||
}
|
||||
|
||||
onOk(binding.checkbox.isChecked, duration)
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.show()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue