-
Notifications
You must be signed in to change notification settings - Fork 290
enhance: save preference.json instantly #436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhance: save preference.json instantly #436
Conversation
Is there any BUG with |
Now saving will only be triggered when you manually close the app. If you force shutdown when Windows shutdown, software crashes, etc., |
The current PR does not save the configuration when the RepositoryNode changes, which should be safe. |
It's ok to call `Save()` multiple times after property of `ViewModels.Preference` changed immediately. If we delay the saving operation 3 seconds after the property changed event, we reduce the times calling `Save`, but the issue metioned in #436 may still exists.
The reason for using asynchronous operations when not closing the application is that 9fe8ffc increased the number of saving opertions for the |
Yes, I know. As I commented in the commit message, using asynchronous operation will reduce the times calling |
* remove `string.IsNullOrEmpty(OS.ShellOrTerminal)` checking from detail backend since it has been checked by `Native.OS.OpenTerminal` * remove `ViewModels.Preference.IsTerminalConfigured` because it is only used by itself (Unlike `IsGitConfigured`). * add `Native.OS.TestShellOrTerminal` and use it instead of setting `Preference.ShellOrTerminal` directly, because we have binded a callback that will save preference into file when its property changed. It may cause lag in some enviroments if we saving preference into file too frequently (see PR #436). * run `dotnet format`
No description provided.