Skip to content

Commit

Permalink
fixed bottom navigation choice not being saved.
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkisDev committed Mar 11, 2024
1 parent fd2f4ae commit faa60eb
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,6 @@ class BottomNavigationBarController extends GetxController
super.onClose();
}

@override
void didChangeAppLifecycleState(AppLifecycleState state) {
super.didChangeAppLifecycleState(state);

if (state == AppLifecycleState.inactive ||
state == AppLifecycleState.paused) {
_saveState();
}
}

Future<void> loadSavedState() async {
int value = await _secureStorageProvider.readTabIndex();
activeTabIndex.value = value;
Expand All @@ -59,6 +49,7 @@ class BottomNavigationBarController extends GetxController

void changeTab(int index) {
activeTabIndex.value = index;
_saveState();

if (index == 0 &&
(timerController.isTimerRunning.value || isTimerRunning.value)) {
Expand Down

0 comments on commit faa60eb

Please sign in to comment.