Explorar o código

refactor: comments removed

Roman Shchekin %!s(int64=2) %!d(string=hai) anos
pai
achega
3b797e0256

+ 0 - 4
scenes/hex_viewer_scene_menu.c

@@ -66,10 +66,6 @@ bool hex_viewer_scene_menu_on_event(void* context, SceneManagerEvent event) {
                 app->scene_manager, HexViewerSceneMenu, SubmenuIndexScene2);
             scene_manager_next_scene(app->scene_manager, HexViewerSceneScene_2);
             return true;
-            // } else if (event.event == SubmenuIndexScene3) {
-            //     scene_manager_set_scene_state(
-            //         app->scene_manager, HexViewerSceneMenu, SubmenuIndexScene3);
-            //     scene_manager_next_scene(app->scene_manager, HexViewerSceneScene_3);
         } else if(event.event == SubmenuIndexScene4) {
             scene_manager_set_scene_state(
                 app->scene_manager, HexViewerSceneMenu, SubmenuIndexScene4);

+ 0 - 32
scenes/hex_viewer_scene_scene_1.c

@@ -23,26 +23,7 @@ void hex_viewer_scene_scene_1_on_enter(void* context) {
         HEX_VIEWER_PERCENT_INPUT,
         false);
 
-    // ValidatorIsFile* validator_is_file = validator_is_file_alloc_init(
-    //     IBUTTON_APP_FOLDER, IBUTTON_APP_FILENAME_EXTENSION, ibutton->key_name);
-    // text_input_set_validator(text_input, validator_is_file_callback, validator_is_file);
-
     view_dispatcher_switch_to_view(app->view_dispatcher, HexViewerSceneScene_1);
-
-    // if(success) {
-    //     //
-    // }
-
-    // if(success) {
-    //     // Load page to do something with result
-    //     //scene_manager_next_scene(app->scene_manager, HexViewerViewIdMenu);
-    //     //scene_manager_previous_scene(app->scene_manager); // temp for showcase
-    //     scene_manager_search_and_switch_to_previous_scene(
-    //         app->scene_manager, HexViewerViewIdStartscreen);
-    // } else {
-    //     // This is basically if someone quites the browser
-    //     scene_manager_previous_scene(app->scene_manager);
-    // }
 }
 
 bool hex_viewer_scene_scene_1_on_event(void* context, SceneManagerEvent event) {
@@ -52,7 +33,6 @@ bool hex_viewer_scene_scene_1_on_event(void* context, SceneManagerEvent event) {
     if(event.type == SceneManagerEventTypeCustom) {
         if(event.event == HexViewerCustomEventMenuPercentEntered) {
             int ipercent = atoi(app->percent_buf);
-            // float percent = atof(app->percent_buf);
             ipercent = MIN(ipercent, 100);
             ipercent = MAX(ipercent, 0);
             float percent = ipercent / 100.0;
@@ -62,18 +42,6 @@ bool hex_viewer_scene_scene_1_on_event(void* context, SceneManagerEvent event) {
             uint32_t scrollable_lines = line_count - HEX_VIEWER_LINES_ON_SCREEN;
             uint32_t target_line = (uint32_t)(percent * scrollable_lines);
 
-            // uint32_t first_line_on_screen = model->file_offset / HEX_VIEWER_BYTES_PER_LINE;
-            // if(line_count > HEX_VIEWER_LINES_ON_SCREEN) {
-            //     uint8_t width = canvas_width(canvas);
-            //     elements_scrollbar_pos(
-            //         canvas,
-            //         width,
-            //         0,
-            //         ROW_HEIGHT * HEX_VIEWER_LINES_ON_SCREEN,
-            //         first_line_on_screen, // TODO
-            //         line_count - (HEX_VIEWER_LINES_ON_SCREEN - 1));
-            // }
-
             uint32_t new_file_offset = target_line * HEX_VIEWER_BYTES_PER_LINE;
             if(app->model->file_size > new_file_offset) {
                 app->model->file_offset = new_file_offset;

+ 0 - 8
scenes/hex_viewer_scene_scene_2.c

@@ -4,12 +4,6 @@
 #include "../helpers/hex_viewer_led.h"
 #include "../views/hex_viewer_scene_2.h"
 
-// void hex_viewer_scene_2_callback(HexViewerCustomEvent event, void* context) {
-//     furi_assert(context);
-//     HexViewer* app = context;
-//     view_dispatcher_send_custom_event(app->view_dispatcher, event);
-// }
-
 void hex_viewer_scene_scene_2_on_enter(void* context) {
     furi_assert(context);
     HexViewer* app = context;
@@ -23,7 +17,6 @@ void hex_viewer_scene_scene_2_on_enter(void* context) {
         app->model->file_size,
         app->model->file_size);
 
-    // DialogsApp* dialogs = furi_record_open(RECORD_DIALOGS);
     DialogMessage* message = dialog_message_alloc();
     dialog_message_set_header(message, "Hex Viewer v2.0", 16, 2, AlignLeft, AlignTop);
     dialog_message_set_icon(message, &I_hex_10px, 3, 2);
@@ -33,7 +26,6 @@ void hex_viewer_scene_scene_2_on_enter(void* context) {
 
     furi_string_free(buffer);
     dialog_message_free(message);
-    // furi_record_close(RECORD_DIALOGS);
 
     scene_manager_search_and_switch_to_previous_scene(
         app->scene_manager, HexViewerViewIdStartscreen);

+ 0 - 4
scenes/hex_viewer_scene_scene_4.c

@@ -22,13 +22,9 @@ void hex_viewer_scene_scene_4_on_enter(void* context) {
     }
 
     if(success) {
-        // Load page to do something with result
-        //scene_manager_next_scene(app->scene_manager, HexViewerViewIdMenu);
-        //scene_manager_previous_scene(app->scene_manager); // temp for showcase
         scene_manager_search_and_switch_to_previous_scene(
             app->scene_manager, HexViewerViewIdStartscreen);
     } else {
-        // This is basically if someone quites the browser
         scene_manager_previous_scene(app->scene_manager);
     }
 }