mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: optimize the UI if fail to open the workspace (#3246)
* chore: async load user profile * chore: enable reset workspace * chore: add confirm dialog
This commit is contained in:
@ -29,7 +29,7 @@ pub(crate) async fn get_key_value_handler(
|
||||
data: AFPluginData<KeyPB>,
|
||||
) -> DataResult<KeyValuePB, FlowyError> {
|
||||
match store_preferences.upgrade() {
|
||||
None => Err(FlowyError::internal().context("The store preferences is already drop"))?,
|
||||
None => Err(FlowyError::internal().with_context("The store preferences is already drop"))?,
|
||||
Some(store_preferences) => {
|
||||
let data = data.into_inner();
|
||||
let value = store_preferences.get_str(&data.key);
|
||||
@ -46,7 +46,7 @@ pub(crate) async fn remove_key_value_handler(
|
||||
data: AFPluginData<KeyPB>,
|
||||
) -> FlowyResult<()> {
|
||||
match store_preferences.upgrade() {
|
||||
None => Err(FlowyError::internal().context("The store preferences is already drop"))?,
|
||||
None => Err(FlowyError::internal().with_context("The store preferences is already drop"))?,
|
||||
Some(store_preferences) => {
|
||||
let data = data.into_inner();
|
||||
store_preferences.remove(&data.key);
|
||||
|
Reference in New Issue
Block a user