From b61e41163be615989abb5e8649543d1a15087d97 Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Thu, 6 Oct 2022 15:10:08 +0300 Subject: [PATCH] fix subghz double click after delete, fix rename bug, fix unirf --- .../main/subghz/scenes/subghz_scene_delete_success.c | 2 +- .../main/subghz/scenes/subghz_scene_save_name.c | 3 ++- applications/main/unirfremix/unirfremix_app.c | 10 +++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/applications/main/subghz/scenes/subghz_scene_delete_success.c b/applications/main/subghz/scenes/subghz_scene_delete_success.c index d6e1f8dd4..9a07be5f5 100644 --- a/applications/main/subghz/scenes/subghz_scene_delete_success.c +++ b/applications/main/subghz/scenes/subghz_scene_delete_success.c @@ -31,7 +31,7 @@ bool subghz_scene_delete_success_on_event(void* context, SceneManagerEvent event scene_manager_next_scene(subghz->scene_manager, SubGhzSceneReadRAW); } else if(scene_manager_search_and_switch_to_previous_scene( subghz->scene_manager, SubGhzSceneSaved)) { - scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSaved); + //scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSaved); } else { scene_manager_search_and_switch_to_previous_scene( subghz->scene_manager, SubGhzSceneStart); diff --git a/applications/main/subghz/scenes/subghz_scene_save_name.c b/applications/main/subghz/scenes/subghz_scene_save_name.c index 7ab4f580b..99596e983 100644 --- a/applications/main/subghz/scenes/subghz_scene_save_name.c +++ b/applications/main/subghz/scenes/subghz_scene_save_name.c @@ -47,6 +47,7 @@ void subghz_scene_save_name_on_enter(void* context) { //highlighting the entire filename by default dev_name_empty = true; } else { + furi_string_reset(subghz->file_path_tmp); furi_string_set(subghz->file_path_tmp, subghz->file_path); path_extract_dirname(furi_string_get_cstr(subghz->file_path), dir_name); path_extract_filename(subghz->file_path, file_name, true); @@ -84,7 +85,7 @@ void subghz_scene_save_name_on_enter(void* context) { bool subghz_scene_save_name_on_event(void* context, SceneManagerEvent event) { SubGhz* subghz = context; if(event.type == SceneManagerEventTypeBack) { - if(!strcmp(subghz->file_name_tmp, "") || + if(!(strcmp(subghz->file_name_tmp, "") == 0) || scene_manager_get_scene_state(subghz->scene_manager, SubGhzSceneReadRAW) != SubGhzCustomEventManagerNoSet) { furi_string_set(subghz->file_path, subghz->file_path_tmp); diff --git a/applications/main/unirfremix/unirfremix_app.c b/applications/main/unirfremix/unirfremix_app.c index ee5b07ece..6d0fa60b4 100644 --- a/applications/main/unirfremix/unirfremix_app.c +++ b/applications/main/unirfremix/unirfremix_app.c @@ -994,7 +994,7 @@ int32_t unirfremix_app(void* p) { if(app->up_enabled) { if(app->processing == 0) { furi_string_reset(app->signal); - app->signal = app->up_file; + furi_string_set(app->signal, app->up_file); app->button = 1; app->processing = 1; } @@ -1012,7 +1012,7 @@ int32_t unirfremix_app(void* p) { if(app->down_enabled) { if(app->processing == 0) { furi_string_reset(app->signal); - app->signal = app->down_file; + furi_string_set(app->signal, app->down_file); app->button = 2; app->processing = 1; } @@ -1030,7 +1030,7 @@ int32_t unirfremix_app(void* p) { if(app->right_enabled) { if(app->processing == 0) { furi_string_reset(app->signal); - app->signal = app->right_file; + furi_string_set(app->signal, app->right_file); app->button = 3; app->processing = 1; } @@ -1048,7 +1048,7 @@ int32_t unirfremix_app(void* p) { if(app->left_enabled) { if(app->processing == 0) { furi_string_reset(app->signal); - app->signal = app->left_file; + furi_string_set(app->signal, app->left_file); app->button = 4; app->processing = 1; } @@ -1066,7 +1066,7 @@ int32_t unirfremix_app(void* p) { if(app->ok_enabled) { if(app->processing == 0) { furi_string_reset(app->signal); - app->signal = app->ok_file; + furi_string_set(app->signal, app->ok_file); app->button = 5; app->processing = 1; }