note: code was started last week and was then discontinued. This is the same feature but started from a fresh main
What's new
This PR links the toggle button from the settings screen to the locationViewmodel which allows to toggle location update. For now, disabling the location means that other user can still see your profile if they stand at your last known position (where you toggled the switch off). In later updates, the ProfileViewmodel will be extended to allow the toggle button to make the user truly invisible to others.
Codebase changes:
Settings.kt: linked to LocationViewModel
AroundYou.kt: Added different empty screens when location update is disabled or permission is not aquired
MainActivity.kt: update components signatures to allow use of PermissionManager, AppDataStore and LocationViewModel
Special thanks to @arthur-mrgt for his very clean interface for location and permissions
Toggle location update 2
note: code was started last week and was then discontinued. This is the same feature but started from a fresh main
What's new
This PR links the toggle button from the settings screen to the
locationViewmodel
which allows to toggle location update. For now, disabling the location means that other user can still see your profile if they stand at your last known position (where you toggled the switch off). In later updates, theProfileViewmodel
will be extended to allow the toggle button to make the user truly invisible to others.Codebase changes:
Settings.kt
: linked toLocationViewModel
AroundYou.kt
: Added different empty screens when location update is disabled or permission is not aquiredMainActivity.kt
: update components signatures to allow use ofPermissionManager
,AppDataStore
andLocationViewModel
Special thanks to @arthur-mrgt for his very clean interface for location and permissions