Move sfw mode to custom app

This commit is contained in:
Willy-JL
2023-01-17 19:58:27 +00:00
parent 68eefc4ae7
commit da2ce47bd3
58 changed files with 147 additions and 320 deletions

View File

@@ -1,5 +1,5 @@
#include "../nfc_i.h"
#include "../../../settings/desktop_settings/desktop_settings_app.h"
#include "../../../settings/xtreme_settings/xtreme_settings.h"
void nfc_scene_save_success_popup_callback(void* context) {
Nfc* nfc = context;
@@ -8,12 +8,10 @@ void nfc_scene_save_success_popup_callback(void* context) {
void nfc_scene_save_success_on_enter(void* context) {
Nfc* nfc = context;
DesktopSettings* settings = malloc(sizeof(DesktopSettings));
DESKTOP_SETTINGS_LOAD(settings);
// Setup view
Popup* popup = nfc->popup;
if(settings->sfw_mode) {
if(XTREME_SETTINGS()->sfw_mode) {
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59_sfw);
} else {
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
@@ -24,7 +22,6 @@ void nfc_scene_save_success_on_enter(void* context) {
popup_set_callback(popup, nfc_scene_save_success_popup_callback);
popup_enable_timeout(popup);
view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewPopup);
free(settings);
}
bool nfc_scene_save_success_on_event(void* context, SceneManagerEvent event) {