Skip to content

Commit

Permalink
clean up testing
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenrats committed Jul 3, 2024
1 parent 293cab3 commit e34c315
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/components/jfx_nav_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ class JfxNavBarLeft extends StatelessWidget {

@override
Widget build(BuildContext context) {
var storedIndex = 1;
return Container(
decoration: BoxDecoration(
// add elevation
Expand Down Expand Up @@ -164,13 +163,8 @@ class JfxNavBarLeft extends StatelessWidget {
icon: Icons.video_library_outlined,
label: 'More',
selected: selectedIndex.value == 9,
onOpened: () async {
storedIndex = selectedIndex.value;
selectedIndex.value = 9;
},
onCanceled: () async {
selectedIndex.value = storedIndex;
},
onOpened: () {},
onCanceled: () {},
onSelected: () async {
bool online = await showOfflineSnackbar(
context, ref.read(authStateProvider.notifier).state);
Expand Down
4 changes: 4 additions & 0 deletions lib/components/jfx_nav_bar_buttons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,13 @@ class JfxNavBarPopupMenuButtonLargeState
});
},
onOpened: () {
widget.onOpened();
setState(() {
menuOpen = true;
});
},
onCanceled: () {
widget.onCanceled();
setState(() {
menuOpen = false;
});
Expand Down Expand Up @@ -329,11 +331,13 @@ class JfxNavBarPopupMenuButtonSmallState
});
},
onOpened: () {
widget.onOpened();
setState(() {
menuOpen = true;
});
},
onCanceled: () {
widget.onSelected();
setState(() {
menuOpen = false;
});
Expand Down

0 comments on commit e34c315

Please sign in to comment.