Skip to content

Commit

Permalink
TW-1528: Close selection mode when click button and selection item is…
Browse files Browse the repository at this point in the history
… empty
  • Loading branch information
hieutbui authored and hoangdat committed Mar 22, 2024
1 parent f1f2644 commit b55603a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/pages/chat_list/chat_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ class ChatListController extends State<ChatList>

if (conversation != null && conversation.isSelected) {
tempConversationSelectionPresentation.remove(conversation);
if (tempConversationSelectionPresentation.isEmpty) {
toggleSelectMode();
}
} else {
tempConversationSelectionPresentation.add(
ConversationSelectionPresentation(
Expand Down Expand Up @@ -239,11 +242,7 @@ class ChatListController extends State<ChatList>
}

void onClickClearSelection() {
if (conversationSelectionNotifier.value.isNotEmpty) {
_clearSelectionItem();
} else {
toggleSelectMode();
}
toggleSelectMode();
}

void resetActiveSpaceId() {
Expand Down

0 comments on commit b55603a

Please sign in to comment.