Explorar o código

[FL-3063] SubGhz: fix start navigation (#2183)

Skorpionm %!s(int64=3) %!d(string=hai) anos
pai
achega
566e80abf6
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      applications/main/subghz/views/receiver.c

+ 2 - 1
applications/main/subghz/views/receiver.c

@@ -309,7 +309,8 @@ bool subghz_view_receiver_input(InputEvent* event, void* context) {
             subghz_receiver->view,
             subghz_receiver->view,
             SubGhzViewReceiverModel * model,
             SubGhzViewReceiverModel * model,
             {
             {
-                if(model->idx != model->history_item - 1) model->idx++;
+                if((model->history_item != 0) && (model->idx != model->history_item - 1))
+                    model->idx++;
             },
             },
             true);
             true);
     } else if(event->key == InputKeyLeft && event->type == InputTypeShort) {
     } else if(event->key == InputKeyLeft && event->type == InputTypeShort) {