Closed P-a-t-r-i-c-k closed 4 years ago
Thanks for the improvement. I didn't notice that. Can you please revert the change from onStart
to onResume
because that edge case is never going to happen. By looking at the activity lifecycle definitions provided by Google you can see that the onResume
state is for scenarios where other apps are in the foreground but the app is still visible. Because of performance concerns, it would be better to only call it when you actually return to the activity from another activity/app.
Fair point, didn't really consider the potential performance hit.
The reloading of the device list depends on the variable reset. In the onStop state of main activity, this value was set to false. Consequently, after creating a new device or removing an existing device and returning to main screen resulted in an outdated device list.
Additionally, I moved the check from onStart to onResume to prevent a possible edge case if an activity is only paused instead of completely stopped.