mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
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:
+1
@@ -16,6 +16,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
@file:Suppress("MatchingDeclarationName")
|
||||
|
||||
package io.element.android.libraries.maplibre.compose
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
|
||||
+8
-4
@@ -24,7 +24,7 @@ import android.content.res.Configuration
|
||||
import android.os.Bundle
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.material.Text
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.Composition
|
||||
import androidx.compose.runtime.CompositionContext
|
||||
@@ -81,7 +81,10 @@ public fun MapboxMap(
|
||||
uiSettings: MapUiSettings = DefaultMapUiSettings,
|
||||
symbolManagerSettings: MapSymbolManagerSettings = DefaultMapSymbolManagerSettings,
|
||||
locationSettings: MapLocationSettings = DefaultMapLocationSettings,
|
||||
content: (@Composable @MapboxMapComposable () -> Unit)? = null,
|
||||
content: (
|
||||
@Composable @MapboxMapComposable
|
||||
() -> Unit
|
||||
)? = null,
|
||||
) {
|
||||
// When in preview, early return a Box with the received modifier preserving layout
|
||||
if (LocalInspectionMode.current) {
|
||||
@@ -158,7 +161,8 @@ private suspend inline fun CompositionContext.newComposition(
|
||||
val style = map.awaitStyle(context, styleUri, images)
|
||||
val symbolManager = SymbolManager(mapView, map, style)
|
||||
return Composition(
|
||||
MapApplier(map, style, symbolManager), this
|
||||
MapApplier(map, style, symbolManager),
|
||||
this
|
||||
).apply {
|
||||
setContent(content)
|
||||
}
|
||||
@@ -234,7 +238,7 @@ private fun MapView.lifecycleObserver(previousState: MutableState<Lifecycle.Even
|
||||
Lifecycle.Event.ON_PAUSE -> this.onPause()
|
||||
Lifecycle.Event.ON_STOP -> this.onStop()
|
||||
Lifecycle.Event.ON_DESTROY -> {
|
||||
//handled in onDispose
|
||||
// handled in onDispose
|
||||
}
|
||||
Lifecycle.Event.ON_ANY -> error("ON_ANY should never be used")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user