Prechádzať zdrojové kódy

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 rokov pred
rodič
commit
b485992c9e
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      Firmware/ultralcd.cpp

+ 1 - 1
Firmware/ultralcd.cpp

@@ -6001,7 +6001,7 @@ void lcd_sdcard_menu()
 				lcd_update_enabled = true;
 			}
 			_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->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.
 		}