mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-12-24 21:56:47 +00:00
fix: search results were filtered accidentally (#7196)
This commit is contained in:
parent
6173022a15
commit
aa9f285f59
@ -57,11 +57,11 @@ impl SearchHandler for DocumentSearchHandler {
|
||||
|
||||
// Grab all views from folder cache
|
||||
// Notice that `get_all_view_pb` returns Views that don't include trashed and private views
|
||||
let mut views = self.folder_manager.get_all_views_pb().await?.into_iter();
|
||||
let views = self.folder_manager.get_all_views_pb().await?;
|
||||
let mut search_results: Vec<SearchResultPB> = vec![];
|
||||
|
||||
for result in results {
|
||||
if let Some(view) = views.find(|v| v.id == result.object_id) {
|
||||
if let Some(view) = views.iter().find(|v| v.id == result.object_id) {
|
||||
// If there is no View for the result, we don't add it to the results
|
||||
// If possible we will extract the icon to display for the result
|
||||
let icon: Option<ResultIconPB> = match view.icon.clone() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user