refactor: route exit saves through FE persistence wrapper; keep text mode simple

This commit is contained in:
2026-03-17 10:07:34 -06:00
parent 592d74e788
commit 0155b07c9d
4 changed files with 50 additions and 2 deletions

View File

@@ -1104,8 +1104,18 @@ zoitechat_exit (void)
plugin_kill_all ();
fe_cleanup ();
if (!save_config ())
g_printerr ("Could not save zoitechat.conf.\n");
{
fe_preferences_save_result save_result;
save_result = fe_preferences_persistence_save_all ();
if (!save_result.success)
{
if (save_result.partial_failure || (!save_result.config_failed && save_result.theme_failed))
g_printerr ("Could not fully save preferences. zoitechat.conf was written, but colors.conf failed.\n");
else
g_printerr ("Could not save zoitechat.conf.\n");
}
}
if (prefs.save_pevents)
{
pevent_save (NULL);