diff --git a/lib/pages/search/search_view.dart b/lib/pages/search/search_view.dart index e7a5c3aa19..1ef7efd115 100644 --- a/lib/pages/search/search_view.dart +++ b/lib/pages/search/search_view.dart @@ -73,8 +73,10 @@ class SearchView extends StatelessWidget { searchController.serverSearchController.searchResultsNotifier, builder: ((context, searchResults, child) { if (searchResults is PresentationServerSideEmptySearch) { + final keyword = searchController.textEditingController.text; if (searchController.searchContactAndRecentChatController! - .recentAndContactsNotifier.value.isNotEmpty) { + .recentAndContactsNotifier.value.isNotEmpty || + (keyword.isValidMatrixId && keyword.startsWith('@'))) { return child!; } return _SearchHeader( diff --git a/lib/pages/search/server_search_view.dart b/lib/pages/search/server_search_view.dart index 8be0ae054a..55add06cd0 100644 --- a/lib/pages/search/server_search_view.dart +++ b/lib/pages/search/server_search_view.dart @@ -28,11 +28,13 @@ class ServerSearchMessagesList extends StatelessWidget { searchController.serverSearchController.searchResultsNotifier, builder: (context, serverSearchNotifier, child) { if (serverSearchNotifier is PresentationServerSideEmptySearch) { + final keyword = searchController.textEditingController.text; if (searchController.searchContactAndRecentChatController! - .recentAndContactsNotifier.value.isNotEmpty) { - return const SizedBox.shrink(); + .recentAndContactsNotifier.value.isEmpty && + !(keyword.isValidMatrixId && keyword.startsWith('@'))) { + return child!; } - return child!; + return const SizedBox.shrink(); } if (serverSearchNotifier is PresentationServerSideSearch) {