Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TW-2106 Fix duplicate result when adding member with mxid #2199

Merged
merged 1 commit into from
Dec 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions lib/pages/new_group/widget/contacts_selection_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,9 @@ class ContactsSelectionList extends StatelessWidget {
valueListenable: presentationContactNotifier,
builder: (context, state, child) {
final isSearchModeEnable = textEditingController.text.isNotEmpty;

final recentContact = presentationRecentContactNotifier.value.isEmpty;
hoangdat marked this conversation as resolved.
Show resolved Hide resolved
return state.fold(
(failure) {
final recentContact =
presentationRecentContactNotifier.value.isEmpty;
final textControllerIsEmpty = textEditingController.text.isEmpty;
if (failure is GetPresentationContactsEmpty ||
failure is GetPresentationContactsFailure) {
Expand All @@ -70,7 +68,8 @@ class ContactsSelectionList extends StatelessWidget {
);
}

if (success is PresentationExternalContactSuccess) {
if (success is PresentationExternalContactSuccess &&
recentContact) {
return SliverToBoxAdapter(
child: ContactItem(
contact: success.contact,
Expand Down
Loading