Преглед изворни кода

[FL-1850] Archive: limit name length in text input view #728

its your bedtime пре 4 година
родитељ
комит
0126b3aba4
2 измењених фајлова са 3 додато и 2 уклоњено
  1. 1 1
      applications/applications.c
  2. 2 1
      applications/archive/scenes/archive_scene_rename.c

+ 1 - 1
applications/applications.c

@@ -259,7 +259,7 @@ const FlipperApplication FLIPPER_SETTINGS_APPS[] = {
     {.app = power_settings_app, .name = "Power", .stack_size = 1024, .icon = NULL},
 #endif
 
-#ifdef APP_DESKTOP
+#ifdef SRV_DESKTOP
     {.app = desktop_settings_app, .name = "Desktop", .stack_size = 1024, .icon = NULL},
 #endif
 

+ 2 - 1
applications/archive/scenes/archive_scene_rename.c

@@ -4,6 +4,7 @@
 #include "../helpers/archive_browser.h"
 
 #define SCENE_RENAME_CUSTOM_EVENT (0UL)
+#define MAX_TEXT_INPUT_LEN 22
 
 void archive_scene_rename_text_input_callback(void* context) {
     ArchiveApp* archive = (ArchiveApp*)context;
@@ -26,7 +27,7 @@ void archive_scene_rename_on_enter(void* context) {
         archive_scene_rename_text_input_callback,
         archive,
         archive->text_store,
-        MAX_NAME_LEN,
+        MAX_TEXT_INPUT_LEN,
         false);
 
     view_dispatcher_switch_to_view(archive->view_dispatcher, ArchiveViewTextInput);