feat: add wake lock to map screen

This commit is contained in:
andrekir 2023-07-15 09:23:37 -03:00 committed by Andre K
parent d1e06e21bf
commit 04e8a6a514
2 changed files with 63 additions and 0 deletions

View file

@ -49,6 +49,7 @@ import com.geeksville.mesh.ui.map.components.CacheLayout
import com.geeksville.mesh.ui.map.components.DownloadButton
import com.geeksville.mesh.ui.map.components.EditWaypointDialog
import com.geeksville.mesh.ui.map.components.MapStyleButton
import com.geeksville.mesh.util.EnableWakeLock
import com.geeksville.mesh.util.SqlTileWriterExt
import com.geeksville.mesh.util.requiredZoomLevel
import com.geeksville.mesh.util.formatAgo
@ -136,6 +137,8 @@ fun MapView(model: UIViewModel = viewModel()) {
val haptic = LocalHapticFeedback.current
fun performHapticFeedback() = haptic.performHapticFeedback(HapticFeedbackType.LongPress)
EnableWakeLock(context)
val map = remember {
MapView(context).apply {
clipToOutline = true