fix: avoid hanging the main thread on repeat start (#584)

This commit is contained in:
Levi authored and GitHub committed 2024-06-20 18:59:50 +08:00
1 parent 8b3b5d4394
commit 06c7fe7a22
3 files changed
+20 -35

No files matched your search

-9
View File
@@ -54,15 +54,6 @@ class Database {
_startConfig, (json) => StartConfigEntity.fromJson(json));
}
void saveLastRunningConfig(StartConfigEntity entity) {
save<StartConfigEntity>(_lastRunningConfig, entity);
}
StartConfigEntity? getLastRunningConfig() {
return get<StartConfigEntity>(
_lastRunningConfig, (json) => StartConfigEntity.fromJson(json));
}
/// Patch non-null fields with the original value
void saveWindowState(WindowStateEntity entity) {
final state = getWindowState();