map node zooming works better

This commit is contained in:
geeksville 2020-04-07 12:13:50 -07:00
parent 58e6f840ea
commit 7af7ec0843
4 changed files with 103 additions and 78 deletions

View file

@ -65,6 +65,15 @@ data class BTScanEntry(val name: String, val macAddress: String, val bonded: Boo
}
class BTScanFragment(screenName: String, id: Int, private val content: @Composable() () -> Unit) :
ComposeFragment(screenName, id, content) {
override fun onStop() {
ScanState.stopScan()
super.onStop()
}
}
@Composable
fun BTScanScreen() {
val context = ContextAmbient.current
@ -146,11 +155,6 @@ fun BTScanScreen() {
ScanState.callback = scanCallback
}
}
onDispose {
ScanState.debug("BTScan component deactivated")
ScanState.stopScan()
}
}
Column {