1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:17:35 +00:00

GDirectoryModel: Add on_path_change hook

This commit is contained in:
Andreas Kling 2019-09-13 21:43:23 +02:00
parent bf23f1e8bc
commit f1c4b65089
2 changed files with 3 additions and 0 deletions

View file

@ -351,5 +351,7 @@ void GDirectoryModel::open(const StringView& a_path)
int rc = read(m_notifier->fd(), buffer, sizeof(buffer));
ASSERT(rc >= 0);
};
if (on_path_change)
on_path_change();
update();
}

View file

@ -34,6 +34,7 @@ public:
size_t bytes_in_files() const { return m_bytes_in_files; }
Function<void(int done, int total)> on_thumbnail_progress;
Function<void()> on_path_change;
struct Entry {
String name;