Filter/sort bugfix

This commit is contained in:
Blaz Kristan 2024-06-04 17:05:11 +02:00
parent c10ec2962b
commit 25ade86994
2 changed files with 4 additions and 5 deletions

View File

@ -458,7 +458,7 @@ static const char _data_FX_MODE_RAINBOW_CYCLE[] PROGMEM = "Rainbow@!,Size;;!";
* Alternating pixels running function.
*/
static uint16_t running(uint32_t color1, uint32_t color2, bool theatre = false) {
unsigned width = (theatre ? 3 : 1) + (SEGMENT.intensity >> 4); // window
int width = (theatre ? 3 : 1) + (SEGMENT.intensity >> 4); // window
uint32_t cycleTime = 50 + (255 - SEGMENT.speed);
uint32_t it = strip.now / cycleTime;
bool usePalette = color1 == SEGCOLOR(0);

View File

@ -2827,9 +2827,8 @@ function search(field, listId = null) {
// restore default preset sorting if no search term is entered
if (!search) {
if (listId === 'pcont') populatePresets();
if (listId === 'pallist') populatePalettes();
return;
if (listId === 'pcont') { populatePresets(); return; }
if (listId === 'pallist') { populatePalettes(); return; }
}
// clear filter if searching in fxlist