refactor: load persisted projects before file system scan

This should improve usability for very large projects.
This commit is contained in:
CJ van den Berg 2024-04-15 23:07:03 +02:00
parent 3eba052c15
commit 07571ef363
3 changed files with 58 additions and 21 deletions

View file

@ -238,6 +238,7 @@ fn receive_safe(self: *Self, from: tp.pid_ref, m: tp.message) tp.result {
}
if (try m.match(.{"quit"})) {
project_manager.shutdown();
return;
}
if (try m.match(.{ "project_manager", "shutdown" })) {
return tp.exit(self.final_exit);
@ -247,6 +248,7 @@ fn receive_safe(self: *Self, from: tp.pid_ref, m: tp.message) tp.result {
_ = try self.mainview.msg(.{"write_restore_info"});
project_manager.shutdown();
self.final_exit = "restart";
return;
}
if (try m.match(.{"sigwinch"})) {