[FL-2651, FL-2863] App name in CLI loader command, RFID data edit fix #1835
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -9,14 +9,11 @@ void lfrfid_scene_save_data_on_enter(void* context) {
|
||||
|
||||
bool need_restore = scene_manager_get_scene_state(app->scene_manager, LfRfidSceneSaveData);
|
||||
|
||||
if(need_restore) {
|
||||
protocol_dict_set_data(app->dict, app->protocol_id, app->old_key_data, size);
|
||||
} else {
|
||||
if(!need_restore) {
|
||||
protocol_dict_get_data(app->dict, app->protocol_id, app->old_key_data, size);
|
||||
protocol_dict_get_data(app->dict, app->protocol_id, app->new_key_data, size);
|
||||
}
|
||||
|
||||
protocol_dict_get_data(app->dict, app->protocol_id, app->new_key_data, size);
|
||||
|
||||
byte_input_set_header_text(byte_input, "Enter the data in hex");
|
||||
|
||||
byte_input_set_result_callback(
|
||||
@@ -41,6 +38,8 @@ bool lfrfid_scene_save_data_on_event(void* context, SceneManagerEvent event) {
|
||||
}
|
||||
} else if(event.type == SceneManagerEventTypeBack) {
|
||||
scene_manager_set_scene_state(scene_manager, LfRfidSceneSaveData, 0);
|
||||
size_t size = protocol_dict_get_data_size(app->dict, app->protocol_id);
|
||||
protocol_dict_set_data(app->dict, app->protocol_id, app->old_key_data, size);
|
||||
}
|
||||
|
||||
return consumed;
|
||||
|
@@ -5,6 +5,9 @@ void lfrfid_scene_save_success_on_enter(void* context) {
|
||||
LfRfid* app = context;
|
||||
Popup* popup = app->popup;
|
||||
|
||||
// Clear state of data enter scene
|
||||
scene_manager_set_scene_state(app->scene_manager, LfRfidSceneSaveData, 0);
|
||||
|
||||
DOLPHIN_DEED(DolphinDeedRfidSave);
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
|
||||
popup_set_header(popup, "Saved!", 5, 7, AlignLeft, AlignTop);
|
||||
|
Reference in New Issue
Block a user