fix nav rail highlighing

This commit is contained in:
ggurdin 2023-10-24 15:03:02 -04:00
parent 5909fe6a65
commit afcb7fcf54
2 changed files with 13 additions and 1 deletions

View file

@ -115,6 +115,15 @@ class ChatListController extends State<ChatList>
}
}
// #Pangea
bool isSelected(int i) {
if (activeFilter == ActiveFilter.spaces && activeSpaceId != null) {
return false;
}
return i == selectedIndex;
}
// Pangea#
ActiveFilter getActiveFilterByDestination(int? i) {
switch (i) {
case 1:

View file

@ -148,7 +148,10 @@ class ChatListView extends StatelessWidget {
itemBuilder: (context, i) {
if (i < destinations.length) {
return NaviRailItem(
isSelected: i == controller.selectedIndex,
// #Pangea
// isSelected: i == controller.selectedIndex,
isSelected: controller.isSelected(i),
// Pangea#
onTap: () => controller.onDestinationSelected(i),
icon: destinations[i].icon,
selectedIcon: destinations[i].selectedIcon,