Fix switching asset pack not updating icons/text

This commit is contained in:
Willy-JL
2023-07-06 01:37:12 +02:00
parent 2e7d074c0c
commit 97c11926a1
3 changed files with 12 additions and 0 deletions

View File

@@ -24,6 +24,7 @@ static void xtreme_app_scene_interface_graphics_asset_pack_changed(VariableItem*
XTREME_ASSETS_PACK_NAME_LEN);
app->asset_pack_index = index;
app->save_settings = true;
app->apply_pack = true;
}
const char* const anim_speed_names[] =

View File

@@ -129,6 +129,16 @@ bool xtreme_app_apply(XtremeApp* app) {
popup_enable_timeout(app->popup);
view_dispatcher_switch_to_view(app->view_dispatcher, XtremeAppViewPopup);
return true;
} else if(app->apply_pack) {
popup_set_header(app->popup, "Reloading...", 64, 26, AlignCenter, AlignCenter);
popup_set_text(app->popup, "Applying asset pack...", 64, 40, AlignCenter, AlignCenter);
popup_set_callback(app->popup, NULL);
popup_set_context(app->popup, NULL);
popup_set_timeout(app->popup, 0);
popup_disable_timeout(app->popup);
view_dispatcher_switch_to_view(app->view_dispatcher, XtremeAppViewPopup);
XTREME_ASSETS_FREE();
XTREME_ASSETS_LOAD();
}
furi_record_close(RECORD_STORAGE);

View File

@@ -65,6 +65,7 @@ typedef struct {
bool save_angry;
bool save_backlight;
bool save_settings;
bool apply_pack;
bool show_slideshow;
bool require_reboot;
} XtremeApp;