refactor: split up mainview write_state and extract_state functions

For better reusuability. So we can store/restore state on project switch.
This commit is contained in:
CJ van den Berg 2025-11-26 13:56:44 +01:00
parent 690498fdcc
commit bbeba10fe5
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 52 additions and 41 deletions

View file

@ -397,7 +397,7 @@ fn receive_safe(self: *Self, from: tp.pid_ref, m: tp.message) !void {
}
if (try m.match(.{"restart"})) {
if (mainview()) |mv| mv.write_restore_info();
if (mainview()) |mv| try mv.write_restore_info();
project_manager.shutdown();
self.final_exit = "restart";
return;