Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c9b195c authored by Aurimas Liutikas's avatar Aurimas Liutikas Committed by Automerger Merge Worker
Browse files

Merge "Fix incompatibilities with Kotlin 1.5.0" am: 600dcaf9 am: 70ba49b0 am: c61fdfd2

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1697314

Change-Id: I4c76908e0cf9a1ba0493322c1f8dedb4fa925e80
parents 59ea8887 c61fdfd2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ class ControlsUiControllerImpl @Inject constructor (
    private val onSeedingComplete = Consumer<Boolean> {
        accepted ->
            if (accepted) {
                selectedStructure = controlsController.get().getFavorites().maxBy {
                selectedStructure = controlsController.get().getFavorites().maxByOrNull {
                    it.controls.size
                } ?: EMPTY_STRUCTURE
                updatePreferences(selectedStructure)
+2 −2
Original line number Diff line number Diff line
@@ -43,8 +43,8 @@ inline infix fun Int.times(action: () -> Unit) {
 * cccc dd
 */
fun Iterable<Pair<String, String>>.columnize(separator: String = " | "): String {
    val col1w = map { (a, _) -> a.length }.max()!!
    val col2w = map { (_, b) -> b.length }.max()!!
    val col1w = map { (a, _) -> a.length }.maxOrNull()!!
    val col2w = map { (_, b) -> b.length }.maxOrNull()!!
    return map { it.first.padEnd(col1w) + separator + it.second.padEnd(col2w) }.joinToString("\n")
}