mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-11-28 11:26:32 +03:00
[FL-2455] LFRFID, iButton: more-menu fix (#1151)
* Items order changed * iButton,Rfid: correct order in enums Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
parent
7ed5b9053a
commit
ec71a5c9d8
@ -2,9 +2,9 @@
|
||||
#include "../ibutton_app.h"
|
||||
|
||||
typedef enum {
|
||||
SubmenuIndexWrite,
|
||||
SubmenuIndexEmulate,
|
||||
SubmenuIndexSave,
|
||||
SubmenuIndexEmulate,
|
||||
SubmenuIndexWrite,
|
||||
} SubmenuIndex;
|
||||
|
||||
static void submenu_callback(void* context, uint32_t index) {
|
||||
@ -22,11 +22,11 @@ void iButtonSceneReadKeyMenu::on_enter(iButtonApp* app) {
|
||||
iButtonAppViewManager* view_manager = app->get_view_manager();
|
||||
Submenu* submenu = view_manager->get_submenu();
|
||||
|
||||
submenu_add_item(submenu, "Save", SubmenuIndexSave, submenu_callback, app);
|
||||
submenu_add_item(submenu, "Emulate", SubmenuIndexEmulate, submenu_callback, app);
|
||||
if(ibutton_key_get_type(app->get_key()) == iButtonKeyDS1990) {
|
||||
submenu_add_item(submenu, "Write", SubmenuIndexWrite, submenu_callback, app);
|
||||
}
|
||||
submenu_add_item(submenu, "Save", SubmenuIndexSave, submenu_callback, app);
|
||||
submenu_add_item(submenu, "Emulate", SubmenuIndexEmulate, submenu_callback, app);
|
||||
submenu_set_selected_item(submenu, submenu_item_selected);
|
||||
|
||||
view_manager->switch_to(iButtonAppViewManager::Type::iButtonAppViewSubmenu);
|
||||
|
@ -1,17 +1,17 @@
|
||||
#include "lfrfid_app_scene_read_menu.h"
|
||||
|
||||
typedef enum {
|
||||
SubmenuWrite,
|
||||
SubmenuSave,
|
||||
SubmenuEmulate,
|
||||
SubmenuWrite,
|
||||
} SubmenuIndex;
|
||||
|
||||
void LfRfidAppSceneReadKeyMenu::on_enter(LfRfidApp* app, bool need_restore) {
|
||||
auto submenu = app->view_controller.get<SubmenuVM>();
|
||||
|
||||
submenu->add_item("Write", SubmenuWrite, submenu_callback, app);
|
||||
submenu->add_item("Save", SubmenuSave, submenu_callback, app);
|
||||
submenu->add_item("Emulate", SubmenuEmulate, submenu_callback, app);
|
||||
submenu->add_item("Write", SubmenuWrite, submenu_callback, app);
|
||||
|
||||
if(need_restore) {
|
||||
submenu->set_selected_item(submenu_item_selected);
|
||||
|
Loading…
Reference in New Issue
Block a user