[FL-2165] Do not allow "write" for keys that do not have write ability. #1055
This commit is contained in:
parent
2ba3a9f09a
commit
76f524d4e9
@ -16,7 +16,9 @@ void iButtonSceneReadedKeyMenu::on_enter(iButtonApp* app) {
|
||||
Submenu* submenu = view_manager->get_submenu();
|
||||
auto callback = cbc::obtain_connector(this, &iButtonSceneReadedKeyMenu::submenu_callback);
|
||||
|
||||
submenu_add_item(submenu, "Write", SubmenuIndexWrite, callback, app);
|
||||
if(app->get_key()->get_key_type() == iButtonKeyType::KeyDallas) {
|
||||
submenu_add_item(submenu, "Write", SubmenuIndexWrite, callback, app);
|
||||
}
|
||||
submenu_add_item(submenu, "Name and save", SubmenuIndexNameAndSave, callback, app);
|
||||
submenu_add_item(submenu, "Emulate", SubmenuIndexEmulate, callback, app);
|
||||
submenu_add_item(submenu, "Read new key", SubmenuIndexReadNewKey, callback, app);
|
||||
|
@ -18,7 +18,9 @@ void iButtonSceneSavedKeyMenu::on_enter(iButtonApp* app) {
|
||||
auto callback = cbc::obtain_connector(this, &iButtonSceneSavedKeyMenu::submenu_callback);
|
||||
|
||||
submenu_add_item(submenu, "Emulate", SubmenuIndexEmulate, callback, app);
|
||||
submenu_add_item(submenu, "Write", SubmenuIndexWrite, callback, app);
|
||||
if(app->get_key()->get_key_type() == iButtonKeyType::KeyDallas) {
|
||||
submenu_add_item(submenu, "Write", SubmenuIndexWrite, callback, app);
|
||||
}
|
||||
submenu_add_item(submenu, "Edit", SubmenuIndexEdit, callback, app);
|
||||
submenu_add_item(submenu, "Delete", SubmenuIndexDelete, callback, app);
|
||||
submenu_add_item(submenu, "Info", SubmenuIndexInfo, callback, app);
|
||||
|
Loading…
Reference in New Issue
Block a user