mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: potential async errors (#1772)
This commit is contained in:
@ -48,7 +48,7 @@ flowy-codegen = { path = "../flowy-codegen"}
|
||||
|
||||
|
||||
[features]
|
||||
default = []
|
||||
default = ["rev-sqlite"]
|
||||
sync = []
|
||||
cloud_sync = ["sync"]
|
||||
rev-sqlite = ["flowy-sqlite", "flowy-folder/rev-sqlite"]
|
||||
|
@ -209,7 +209,7 @@ impl ViewController {
|
||||
let deleted_view = self
|
||||
.persistence
|
||||
.begin_transaction(|transaction| {
|
||||
let view = transaction.read_view(&view_id)?;
|
||||
let view = transaction.read_view(view_id)?;
|
||||
let views = read_belonging_views_on_local(&view.app_id, self.trash_controller.clone(), &transaction)?;
|
||||
|
||||
let index = views
|
||||
@ -223,12 +223,12 @@ impl ViewController {
|
||||
})
|
||||
.await?;
|
||||
|
||||
send_notification(&view_id, FolderNotification::ViewMoveToTrash)
|
||||
send_notification(view_id, FolderNotification::ViewMoveToTrash)
|
||||
.payload(deleted_view)
|
||||
.send();
|
||||
|
||||
let processor = self.get_data_processor_from_view_id(&view_id).await?;
|
||||
processor.close_view(&view_id).await?;
|
||||
let processor = self.get_data_processor_from_view_id(view_id).await?;
|
||||
processor.close_view(view_id).await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ pub(crate) async fn delete_view_handler(
|
||||
) -> Result<(), FlowyError> {
|
||||
let params: RepeatedViewIdPB = data.into_inner();
|
||||
for view_id in ¶ms.items {
|
||||
let _ = view_controller.move_view_to_trash(&view_id).await;
|
||||
let _ = view_controller.move_view_to_trash(view_id).await;
|
||||
}
|
||||
|
||||
let trash = view_controller
|
||||
|
Reference in New Issue
Block a user