From 4e3620923f3c03976bfdc59712d2b36493564f18 Mon Sep 17 00:00:00 2001 From: MasouShizuka Date: Tue, 30 Apr 2024 18:47:49 +0800 Subject: [PATCH] fix: fix the `update_after_save` and `update_after_load` --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index a01a61f..6c8b843 100644 --- a/init.lua +++ b/init.lua @@ -146,7 +146,7 @@ local save_project = ya.sync(function(state, idx, desc) project = project, } - if state.update_after_save then + if state.last.update_after_save then projects.last = project end @@ -176,7 +176,7 @@ local load_project = ya.sync(function(state, project, desc) ya.manager_emit("tab_close", { 0 }) ya.manager_emit("tab_switch", { project.active_idx - 1 }) - if state.update_after_load then + if state.last.update_after_load then local projects = _get_projects() projects.last = project _save_state(projects)