reversed the switch to be more clear if the navigation is toggled
This commit is contained in:
parent
78adb3d65e
commit
cccf4b65cd
1 changed files with 8 additions and 6 deletions
|
|
@ -21,8 +21,8 @@ final navigationItems = {
|
||||||
"/MangaLibrary": "Manga",
|
"/MangaLibrary": "Manga",
|
||||||
"/AnimeLibrary": "Anime",
|
"/AnimeLibrary": "Anime",
|
||||||
"/NovelLibrary": "Novel",
|
"/NovelLibrary": "Novel",
|
||||||
"/updates": "updates",
|
"/updates": "Updates",
|
||||||
"/history": "history",
|
"/history": "History",
|
||||||
"/browse": "Browse",
|
"/browse": "Browse",
|
||||||
"/more": "More",
|
"/more": "More",
|
||||||
};
|
};
|
||||||
|
|
@ -501,14 +501,14 @@ class _CustomNavigationSettingsState
|
||||||
key: Key(navigation),
|
key: Key(navigation),
|
||||||
dense: true,
|
dense: true,
|
||||||
contentPadding: const EdgeInsets.only(left: 0, right: 40),
|
contentPadding: const EdgeInsets.only(left: 0, right: 40),
|
||||||
value: hideItems.contains(navigation),
|
value: !hideItems.contains(navigation),
|
||||||
onChanged: navigation == "/more"
|
onChanged: navigation == "/more"
|
||||||
? null
|
? null
|
||||||
: (value) {
|
: (value) {
|
||||||
final temp = hideItems.toList();
|
final temp = hideItems.toList();
|
||||||
if (value && !hideItems.contains(navigation)) {
|
if (!value && !hideItems.contains(navigation)) {
|
||||||
temp.add(navigation);
|
temp.add(navigation);
|
||||||
} else {
|
} else if (value) {
|
||||||
temp.remove(navigation);
|
temp.remove(navigation);
|
||||||
}
|
}
|
||||||
ref.read(hideItemsStateProvider.notifier).set(temp);
|
ref.read(hideItemsStateProvider.notifier).set(temp);
|
||||||
|
|
@ -530,7 +530,9 @@ class _CustomNavigationSettingsState
|
||||||
}
|
}
|
||||||
navigationOrder[newIndex] = draggedItem;
|
navigationOrder[newIndex] = draggedItem;
|
||||||
}
|
}
|
||||||
ref.read(navigationOrderStateProvider.notifier).set(navigationOrder);
|
ref
|
||||||
|
.read(navigationOrderStateProvider.notifier)
|
||||||
|
.set(navigationOrder);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue