Browse Source

If in farm mode, force the sorting direction to be reversed

So in an ideal scenario, the newest file is first. This of course breaks as soon as a file is deleted/renamed/moved, but it should at least be fixed now compared to before where the direction could be influenced by a disabled setting
Alex Voinea 2 years ago
parent
commit
b485992c9e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Firmware/ultralcd.cpp

+ 1 - 1
Firmware/ultralcd.cpp

@@ -6001,7 +6001,7 @@ void lcd_sdcard_menu()
 				lcd_update_enabled = true;
 				lcd_update_enabled = true;
 			}
 			}
 			_md->fileCnt = card.getnrfilenames();
 			_md->fileCnt = card.getnrfilenames();
-			_md->sdSort = eeprom_read_byte((uint8_t*)EEPROM_SD_SORT);
+			_md->sdSort = farm_mode ? SD_SORT_NONE : eeprom_read_byte((uint8_t*)EEPROM_SD_SORT);
 			_md->menuState = _standard;
 			_md->menuState = _standard;
 			_md->row = -1; // assume that no SD file/dir is currently selected. Once they are rendered, it will be changed to the correct row for the _scrolling state.
 			_md->row = -1; // assume that no SD file/dir is currently selected. Once they are rendered, it will be changed to the correct row for the _scrolling state.
 		}
 		}