plugins: Disk Tidy: wait for dircache

Running Disk Tidy while the dircache is loading is a lot
slower than waiting for it to finish building first.

Typical scenarios for this would be starting Disk Tidy
immediately after booting or after unplugging from USB.

Deleting files during a dircache build also seems to easily
result in memory corruption, as evidenced by visual glitches
appearing in the theme.

Change-Id: I9250d918d916b112ffe2504a9225a0b52bcc3622
This commit is contained in:
Christian Soffke 2025-12-20 06:06:05 +01:00
parent 8e512d1f79
commit f7ede2b9df
3 changed files with 10 additions and 0 deletions

View file

@ -1022,6 +1022,9 @@ struct plugin_api {
#endif
char* (*strstr)(const char *s1, const char *s2);
bool (*sb_set_title_text)(const char* title, enum themable_icons icon, enum screen_type screen);
#ifdef HAVE_DIRCACHE
void (*dircache_wait)(void);
#endif
};
/* plugin header */