mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-05-08 06:34:20 -04:00
Merge pull request #450 from andrekir/back-stack
fix back not moving task to background
This commit is contained in:
@@ -937,6 +937,14 @@ class MainActivity : BaseActivity(), Logging,
|
||||
model.meshService = null
|
||||
}
|
||||
|
||||
override fun onBackPressed() { // FIXME Override back button to avoid closing
|
||||
if (supportFragmentManager.backStackEntryCount == 0) {
|
||||
moveTaskToBack(false)
|
||||
} else {
|
||||
super.onBackPressed()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onStop() {
|
||||
unregisterMeshReceiver() // No point in receiving updates while the GUI is gone, we'll get them when the user launches the activity
|
||||
unbindMeshService()
|
||||
|
||||
Reference in New Issue
Block a user