mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-22 05:30:18 +00:00
refactor: setup OK acts transactional now; apply staged theme before save, roll back on fail
This commit is contained in:
@@ -188,12 +188,21 @@ theme_preferences_stage_begin (void)
|
||||
}
|
||||
|
||||
void
|
||||
theme_preferences_stage_commit (void)
|
||||
theme_preferences_stage_apply (void)
|
||||
{
|
||||
if (!theme_preferences_stage.active)
|
||||
return;
|
||||
|
||||
theme_preferences_stage_sync_runtime_to_staged ();
|
||||
}
|
||||
|
||||
void
|
||||
theme_preferences_stage_commit (void)
|
||||
{
|
||||
if (!theme_preferences_stage.active)
|
||||
return;
|
||||
|
||||
theme_preferences_stage_apply ();
|
||||
memset (&theme_preferences_stage, 0, sizeof (theme_preferences_stage));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user