mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-14 00:37:21 +00:00
Fix cursor hiding after delete and exit from exit dialog
This commit is contained in:
parent
3d1ef1aae3
commit
0b68487519
1 changed files with 4 additions and 4 deletions
|
@ -204,6 +204,9 @@ bool subghz_scene_receiver_on_event(void* context, SceneManagerEvent event) {
|
|||
SubGhz* subghz = context;
|
||||
bool consumed = false;
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
// Save cursor position before going to any other dialog
|
||||
subghz->idx_menu_chosen = subghz_view_receiver_get_idx_menu(subghz->subghz_receiver);
|
||||
|
||||
switch(event.event) {
|
||||
case SubGhzCustomEventViewReceiverBack:
|
||||
// Stop CC1101 Rx
|
||||
|
@ -226,23 +229,21 @@ bool subghz_scene_receiver_on_event(void* context, SceneManagerEvent event) {
|
|||
break;
|
||||
case SubGhzCustomEventViewReceiverOK:
|
||||
// Show file info, scene: receiver_info
|
||||
subghz->idx_menu_chosen = subghz_view_receiver_get_idx_menu(subghz->subghz_receiver);
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneReceiverInfo);
|
||||
dolphin_deed(DolphinDeedSubGhzReceiverInfo);
|
||||
consumed = true;
|
||||
break;
|
||||
case SubGhzCustomEventViewReceiverDeleteItem:
|
||||
subghz->state_notifications = SubGhzNotificationStateRx;
|
||||
subghz->idx_menu_chosen = subghz_view_receiver_get_idx_menu(subghz->subghz_receiver);
|
||||
|
||||
subghz_view_receiver_disable_draw_callback(subghz->subghz_receiver);
|
||||
|
||||
subghz_history_delete_item(subghz->history, subghz->idx_menu_chosen);
|
||||
subghz_view_receiver_delete_element_callback(subghz->subghz_receiver);
|
||||
|
||||
subghz_view_receiver_enable_draw_callback(subghz->subghz_receiver);
|
||||
|
||||
subghz_scene_receiver_update_statusbar(subghz);
|
||||
subghz->idx_menu_chosen = subghz_view_receiver_get_idx_menu(subghz->subghz_receiver);
|
||||
if(subghz_history_get_last_index(subghz->history) == 0) {
|
||||
subghz_rx_key_state_set(subghz, SubGhzRxKeyStateStart);
|
||||
}
|
||||
|
@ -250,7 +251,6 @@ bool subghz_scene_receiver_on_event(void* context, SceneManagerEvent event) {
|
|||
break;
|
||||
case SubGhzCustomEventViewReceiverConfig:
|
||||
// Actually signals are received but SubGhzNotificationStateRx is not working inside Config Scene
|
||||
subghz->idx_menu_chosen = subghz_view_receiver_get_idx_menu(subghz->subghz_receiver);
|
||||
scene_manager_set_scene_state(
|
||||
subghz->scene_manager, SubGhzViewIdReceiver, SubGhzCustomEventManagerSet);
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneReceiverConfig);
|
||||
|
|
Loading…
Reference in a new issue