upgrade ktlint plugin to 12.0.3 (#4169)
There are some new rules, I think they mostly make sense, except for the max line length which I had to disable because we are over it in a lot of places. --------- Co-authored-by: Goooler <wangzongler@gmail.com>
This commit is contained in:
parent
33cd6fdb98
commit
5192fb08a5
215 changed files with 2813 additions and 1177 deletions
|
|
@ -35,7 +35,10 @@ data class AttachmentViewData(
|
|||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun list(status: Status, alwaysShowSensitiveMedia: Boolean = false): List<AttachmentViewData> {
|
||||
fun list(
|
||||
status: Status,
|
||||
alwaysShowSensitiveMedia: Boolean = false
|
||||
): List<AttachmentViewData> {
|
||||
val actionable = status.actionableStatus
|
||||
return actionable.attachments.map { attachment ->
|
||||
AttachmentViewData(
|
||||
|
|
|
|||
|
|
@ -53,7 +53,10 @@ fun calculatePercent(fraction: Int, totalVoters: Int?, totalVotes: Int): Int {
|
|||
}
|
||||
|
||||
fun buildDescription(title: String, percent: Int, voted: Boolean, context: Context): Spanned {
|
||||
val builder = SpannableStringBuilder(context.getString(R.string.poll_percent_format, percent).parseAsHtml())
|
||||
val builder =
|
||||
SpannableStringBuilder(
|
||||
context.getString(R.string.poll_percent_format, percent).parseAsHtml()
|
||||
)
|
||||
if (voted) {
|
||||
builder.append(" ✓ ")
|
||||
} else {
|
||||
|
|
@ -71,7 +74,11 @@ fun Poll?.toViewData(): PollViewData? {
|
|||
multiple = multiple,
|
||||
votesCount = votesCount,
|
||||
votersCount = votersCount,
|
||||
options = options.mapIndexed { index, option -> option.toViewData(ownVotes?.contains(index) == true) },
|
||||
options = options.mapIndexed { index, option ->
|
||||
option.toViewData(
|
||||
ownVotes?.contains(index) == true
|
||||
)
|
||||
},
|
||||
voted = voted
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue