Skip to content

Commit

Permalink
TW-1825: Copy/paste not work in search screen (#1874)
Browse files Browse the repository at this point in the history
* TW-1825: Fix search results aren't displayed correctly when copy/paste

* TW-1825: Write unit test for this case
  • Loading branch information
nqhhdev authored and Te-Z committed Jun 18, 2024
1 parent 678507f commit 5247b91
Show file tree
Hide file tree
Showing 3 changed files with 2,778 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
.history
.svn/
prime

#generated file
*.g.dart
**/*.mocks.dart

# libolm package
/assets/js/package
Expand Down Expand Up @@ -61,5 +64,4 @@ ios/Podfile.lock
/linux/out
/macos/out
.vs
olm
test/interceptor/*.mocks.dart
olm
16 changes: 16 additions & 0 deletions lib/presentation/mixins/contacts_view_controller_mixin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ mixin class ContactsViewControllerMixin {
);
presentationPhonebookContactNotifier.value =
const Right(GetPhonebookContactsInitial());
_refreshRecentContacts(
client: client,
keyword: keyword.isEmpty ? null : keyword,
matrixLocalizations: matrixLocalizations,
);
return;
}
_refreshContacts(keyword);
Expand Down Expand Up @@ -320,4 +325,15 @@ mixin class ContactsViewControllerMixin {
presentationPhonebookContactNotifier.dispose();
presentationRecentContactNotifier.dispose();
}

@visibleForTesting
void refreshAllContactsTest({
required Client client,
required MatrixLocalizations matrixLocalizations,
}) {
_refreshAllContacts(
client: client,
matrixLocalizations: matrixLocalizations,
);
}
}
Loading

0 comments on commit 5247b91

Please sign in to comment.