Update kotlin (#5317)

* Update kotlin

* Upgrade Metro and add new `@Origin` annotation

* Suppress warnings in overridden method as nothing else would work

* "Fix" quality warnings about reusing the same string literal

* Don't use `compat` version for `datetime` dependency

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
This commit is contained in:
renovate[bot] 2025-09-26 08:34:20 +02:00 committed by GitHub
parent 68fa054a68
commit a0ed77775d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 21 additions and 11 deletions

View file

@ -8,7 +8,7 @@
package io.element.android.libraries.maplibre.compose
import android.content.ComponentCallbacks
import android.content.ComponentCallbacks2
import android.content.Context
import android.content.res.Configuration
import android.os.Bundle
@ -235,11 +235,15 @@ private fun MapView.lifecycleObserver(previousState: MutableState<Lifecycle.Even
previousState.value = event
}
private fun MapView.componentCallbacks(): ComponentCallbacks =
object : ComponentCallbacks {
override fun onConfigurationChanged(config: Configuration) {}
private fun MapView.componentCallbacks(): ComponentCallbacks2 =
object : ComponentCallbacks2 {
override fun onConfigurationChanged(config: Configuration) = Unit
override fun onLowMemory() {
@Suppress("OVERRIDE_DEPRECATION")
override fun onLowMemory() = Unit
override fun onTrimMemory(level: Int) {
// We call the `MapView.onLowMemory` method for any memory trim level
this@componentCallbacks.onLowMemory()
}
}