Closed PatrikElfstrom closed 6 days ago
I took a look and I believe the following is the proper fix:
for (const option of $("logLevelSelect").options) // replaced some methods to migrate away from mootools
option.setAttribute("selected", selectedLogLevels.includes(option.value));
I took a look and I believe the following is the proper fix:
Change
to:
for (const option of $("logLevelSelect").options) // replaced some methods to migrate away from mootools option.setAttribute("selected", selectedLogLevels.includes(option.value));
Yeah, that is probably a more correct fix. But come to think of it I think we could even just remove that loop entirely if we use the selected attributes.
But come to think of it I think we could even just remove that loop entirely if we use the selected attributes.
I'm not sure about that, here it load/restore the preference: https://github.com/qbittorrent/qBittorrent/blob/9dcb477ce08c4f31a1086dfd1f7a4381c8550cd1/src/webui/www/private/views/log.html#L188
But come to think of it I think we could even just remove that loop entirely if we use the selected attributes.
I'm not sure about that, here it load/restore the preference:
Yeah you're right. I missed that. I've updated the commit with your recommended change.
@PatrikElfstrom Thank you!
Fixes bug where the first time visiting Execution Log view all log levels are deselected but log items with all levels are still displayed. This requires you to select a log level and then deselect it to hide that log level.
https://github.com/user-attachments/assets/d817e28c-9d86-4017-8ee8-4962918e5579