Now Mifare word is changed only on the app level without changes to lib level

This commit is contained in:
RebornedBrain 2024-01-12 23:33:53 +03:00
parent 22aba527b7
commit 321a56d934
3 changed files with 17 additions and 3 deletions

View File

@ -23,6 +23,8 @@ static void nfc_scene_info_on_enter_mf_classic(NfcApp* instance) {
FuriString* temp_str = furi_string_alloc(); FuriString* temp_str = furi_string_alloc();
furi_string_cat_printf( furi_string_cat_printf(
temp_str, "\e#%s\n", nfc_device_get_name(device, NfcDeviceNameTypeFull)); temp_str, "\e#%s\n", nfc_device_get_name(device, NfcDeviceNameTypeFull));
furi_string_replace(temp_str, "Mifare", "MIFARE");
nfc_render_mf_classic_info(data, NfcProtocolFormatTypeFull, temp_str); nfc_render_mf_classic_info(data, NfcProtocolFormatTypeFull, temp_str);
widget_add_text_scroll_element( widget_add_text_scroll_element(
@ -126,6 +128,8 @@ static void nfc_scene_read_success_on_enter_mf_classic(NfcApp* instance) {
FuriString* temp_str = furi_string_alloc(); FuriString* temp_str = furi_string_alloc();
furi_string_cat_printf( furi_string_cat_printf(
temp_str, "\e#%s\n", nfc_device_get_name(device, NfcDeviceNameTypeFull)); temp_str, "\e#%s\n", nfc_device_get_name(device, NfcDeviceNameTypeFull));
furi_string_replace(temp_str, "Mifare", "MIFARE");
nfc_render_mf_classic_info(data, NfcProtocolFormatTypeShort, temp_str); nfc_render_mf_classic_info(data, NfcProtocolFormatTypeShort, temp_str);
widget_add_text_scroll_element( widget_add_text_scroll_element(

View File

@ -24,7 +24,7 @@ void nfc_scene_extra_actions_on_enter(void* context) {
instance); instance);
submenu_add_item( submenu_add_item(
submenu, submenu,
"Mifare Classic Keys", "MIFARE Classic Keys",
SubmenuIndexMfClassicKeys, SubmenuIndexMfClassicKeys,
nfc_scene_extra_actions_submenu_callback, nfc_scene_extra_actions_submenu_callback,
instance); instance);

View File

@ -32,10 +32,20 @@ void nfc_scene_set_type_on_enter(void* context) {
nfc_protocol_support_common_submenu_callback, nfc_protocol_support_common_submenu_callback,
instance); instance);
FuriString* str = furi_string_alloc();
for(size_t i = 0; i < NfcDataGeneratorTypeNum; i++) { for(size_t i = 0; i < NfcDataGeneratorTypeNum; i++) {
const char* name = nfc_data_generator_get_name(i); furi_string_cat_str(str, nfc_data_generator_get_name(i));
submenu_add_item(submenu, name, i, nfc_protocol_support_common_submenu_callback, instance); furi_string_replace_str(str, "Mifare", "MIFARE");
submenu_add_item(
submenu,
furi_string_get_cstr(str),
i,
nfc_protocol_support_common_submenu_callback,
instance);
furi_string_reset(str);
} }
furi_string_free(str);
view_dispatcher_switch_to_view(instance->view_dispatcher, NfcViewMenu); view_dispatcher_switch_to_view(instance->view_dispatcher, NfcViewMenu);
} }