Skip to content

Commit

Permalink
TW-1497: Filter chat is yet accepted invitation
Browse files Browse the repository at this point in the history
  • Loading branch information
nqhhdev authored and hoangdat committed Apr 5, 2024
1 parent 529b48c commit 237df2a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/pages/forward/forward.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class ForwardController extends State<Forward> with SearchRecentChat {
selectedRoomIdNotifier.value = id;
}

final ActiveFilter _activeFilterAllChats = ActiveFilter.allChats;
final ActiveFilter _activeFilterAllChats = ActiveFilter.acceptedChats;

List<Room> get filteredRoomsForAll =>
Matrix.of(context).client.filteredRoomsForAll(_activeFilterAllChats);
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/share/share.dart
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class ShareController extends State<Share>
}
}

final ActiveFilter _activeFilterAllChats = ActiveFilter.allChats;
final ActiveFilter _activeFilterAllChats = ActiveFilter.acceptedChats;

List<Room> get filteredRoomsForAll =>
Matrix.of(context).client.filteredRoomsForAll(_activeFilterAllChats);
Expand Down
4 changes: 4 additions & 0 deletions lib/presentation/enum/chat_list/chat_list_enum.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ enum PopupMenuAction {

enum ActiveFilter {
allChats,
acceptedChats,
groups,
messages,
spaces;
Expand All @@ -37,6 +38,9 @@ enum ActiveFilter {
!room.isSpace && room.isDirectChat && !room.isStoryRoom;
case ActiveFilter.spaces:
return (r) => r.isSpace;
case ActiveFilter.acceptedChats:
return (room) =>
!room.isSpace && !room.isStoryRoom && !room.isInvitation;
}
}
}
Expand Down

0 comments on commit 237df2a

Please sign in to comment.