fit full name on display

This commit is contained in:
MX 2024-02-10 17:55:19 +03:00
parent 37708b0e79
commit 8a86571068
No known key found for this signature in database
GPG key ID: 7CCC66B7DBDD1C83

View file

@ -32,20 +32,10 @@ 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++) {
furi_string_cat_str(str, nfc_data_generator_get_name(i)); const char* name = nfc_data_generator_get_name(i);
furi_string_replace_str(str, "Mifare", "MIFARE"); submenu_add_item(submenu, name, i, nfc_protocol_support_common_submenu_callback, instance);
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);
} }