1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 21:48:13 +00:00

LibGUI: Update model every 100ms when generating thumbmnails

This dramatically improves the responsiveness of FileManager when
navigating to folders with many images.
This commit is contained in:
Tim Ledbetter 2023-10-03 17:51:18 +01:00 committed by Andreas Kling
parent 1abc52a689
commit debb4edcc8
2 changed files with 14 additions and 4 deletions

View file

@ -9,6 +9,7 @@
#include <AK/HashMap.h>
#include <LibCore/DateTime.h>
#include <LibCore/ElapsedTimer.h>
#include <LibCore/FileWatcher.h>
#include <LibGUI/Model.h>
#include <string.h>
@ -174,6 +175,8 @@ private:
unsigned m_thumbnail_progress { 0 };
unsigned m_thumbnail_progress_total { 0 };
Core::ElapsedTimer m_ui_update_timer;
Optional<Vector<DeprecatedString>> m_allowed_file_extensions;
bool m_should_show_dotfiles { false };