Update plugin ktlint to v12.1.0 (#2200)

* Update plugin ktlint to v12.1.0

* Run `./gradlew ktlintFormat` and fix some issues manually.

* Fix other issues reproted by Ktlint

* Limit false positives, KtLint removes unnecessary curly brace in String templates.

* Remove useless Unit

* Minor improvements over ktlint changes

* Restore `AlertDialogContent` behaviour

* Update screenshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
renovate[bot] 2024-01-10 16:22:24 +01:00 committed by GitHub
parent 7e1866818e
commit c8bd362397
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
442 changed files with 1091 additions and 1081 deletions

View file

@ -36,4 +36,3 @@ fun Context.isScreenReaderEnabled(): Boolean {
it.isEnabled && it.isTouchExplorationEnabled
}
}

View file

@ -26,6 +26,6 @@ fun PackageManager.getApplicationInfoCompat(packageName: String, flags: Int): Ap
packageName,
PackageManager.ApplicationInfoFlags.of(flags.toLong())
)
else -> @Suppress("DEPRECATION") getApplicationInfo(packageName, flags)
else -> getApplicationInfo(packageName, flags)
}
}

View file

@ -26,8 +26,8 @@ fun String.hash() = try {
val digest = MessageDigest.getInstance("SHA-512")
digest.update(toByteArray())
digest.digest()
.joinToString("") { String.format(Locale.ROOT, "%02X", it) }
.lowercase(Locale.ROOT)
.joinToString("") { String.format(Locale.ROOT, "%02X", it) }
.lowercase(Locale.ROOT)
} catch (exc: Exception) {
// Should not happen, but just in case
hashCode().toString()

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.element.android.libraries.androidutils.filesize
package io.element.android.libraries.androidutils.filesize
import android.os.Build
import com.google.common.truth.Truth.assertThat