added sfw mode back to nfc

This commit is contained in:
jbohack
2023-01-04 15:35:16 -05:00
parent a123ce9a38
commit 1e02d4803b
9 changed files with 90 additions and 9 deletions

View File

@@ -1,4 +1,5 @@
#include "../nfc_i.h"
#include "../../../settings/desktop_settings/desktop_settings_app.h"
void nfc_scene_save_success_popup_callback(void* context) {
Nfc* nfc = context;
@@ -7,16 +8,24 @@ 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;
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
if (settings->sfw_mode) {
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59_sfw);
}
else {
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
}
popup_set_header(popup, "Saved!", 13, 22, AlignLeft, AlignBottom);
popup_set_timeout(popup, 1500);
popup_set_context(popup, nfc);
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) {