fix nav rail highlighing
This commit is contained in:
parent
5909fe6a65
commit
afcb7fcf54
2 changed files with 13 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue