mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix: per-device location sharing (#2010)
This commit is contained in:
parent
ff5cc55a60
commit
868d705b2d
5 changed files with 69 additions and 100 deletions
|
|
@ -270,14 +270,6 @@ class MainActivity : AppCompatActivity(), Logging {
|
|||
// Called when we gain/lose a connection to our mesh radio
|
||||
private fun onMeshConnectionChanged(newConnection: MeshService.ConnectionState) {
|
||||
if (newConnection == MeshService.ConnectionState.CONNECTED) {
|
||||
serviceRepository.meshService?.let { service ->
|
||||
// if provideLocation enabled: Start providing location (from phone GPS) to mesh
|
||||
if (model.provideLocation.value == true) {
|
||||
service.startProvideLocation()
|
||||
} else {
|
||||
service.stopProvideLocation()
|
||||
}
|
||||
}
|
||||
checkNotificationPermissions()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue