mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: remove lru (#5008)
* chore: remove lru * chore: update logs * chore: clippy
This commit is contained in:
@ -205,7 +205,7 @@ impl FolderManager {
|
||||
workspace_id,
|
||||
CollabType::Folder,
|
||||
collab_db,
|
||||
DocStateSource::FromDocState(vec![]),
|
||||
DocStateSource::FromDisk,
|
||||
CollabPersistenceConfig::new()
|
||||
.enable_snapshot(true)
|
||||
.snapshot_per_update(50),
|
||||
@ -782,7 +782,15 @@ impl FolderManager {
|
||||
},
|
||||
)?;
|
||||
|
||||
send_workspace_setting_notification(workspace_id, self.get_current_view().await);
|
||||
let view = self.get_current_view().await;
|
||||
if let Some(view) = &view {
|
||||
let view_layout: ViewLayout = view.layout.clone().into();
|
||||
if let Some(handle) = self.operation_handlers.get(&view_layout) {
|
||||
let _ = handle.open_view(view_id).await;
|
||||
}
|
||||
}
|
||||
|
||||
send_workspace_setting_notification(workspace_id, view);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -211,7 +211,6 @@ pub(crate) fn notify_did_update_section_views(workspace_id: &str, folder: &Folde
|
||||
|
||||
pub(crate) fn notify_did_update_workspace(workspace_id: &str, folder: &Folder) {
|
||||
let repeated_view: RepeatedViewPB = get_workspace_public_view_pbs(workspace_id, folder).into();
|
||||
tracing::trace!("Did update workspace views: {:?}", repeated_view);
|
||||
send_notification(workspace_id, FolderNotification::DidUpdateWorkspaceViews)
|
||||
.payload(repeated_view)
|
||||
.send();
|
||||
|
@ -32,6 +32,7 @@ pub trait FolderOperationHandler {
|
||||
FutureResult::new(async { Ok(()) })
|
||||
}
|
||||
|
||||
fn open_view(&self, view_id: &str) -> FutureResult<(), FlowyError>;
|
||||
/// Closes the view and releases the resources that this view has in
|
||||
/// the backend
|
||||
fn close_view(&self, view_id: &str) -> FutureResult<(), FlowyError>;
|
||||
|
Reference in New Issue
Block a user