Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/src/main/java/com/easyfitness/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,7 @@ public boolean onOptionsItemSelected(@NonNull MenuItem item) {
}

mIntro014Launched = false; // redisplay the intro
savePreferences(); // saving immediatly to prevent a race condition with another instance of this activity

dialog.dismiss(); // Close the dialog
finish(); // Close app
Expand Down Expand Up @@ -846,6 +847,9 @@ private void showFragment(String pFragmentName) {
@Override
protected void onStop() {
super.onStop();

//This shouldn't be relied on. When this condition is finishing another activity can read the preferences before this saves the final state.
//TODO search and remove code that still relies on this saving the preferences
savePreferences();
}

Expand Down