Tracker: Preload Trash icon manually, fixes #8696.

Change-Id: I171e6ee9305d4840e408a3b1c001fa5028d0bd95
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10653
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
John Scipione
2026-04-06 12:06:53 +00:00
committed by nephele nephele
parent 84dc21e19e
commit 749584f78e
3 changed files with 14 additions and 0 deletions
+3
View File
@@ -965,6 +965,9 @@ IconCache::Preload(AutoLock<SimpleIconCache>* nodeCacheLocker,
entry = GetPrinterIcon(nodeCacheLocker, sharedCacheLocker,
&resultingOpenCache, model, source, mode, size, &lazyBitmap);
ASSERT(entry != NULL);
} else if (model->IsTrash()) {
// do not preload Trash icon, TrashWatcher handles it.
source = kNode;
} else {
if (source == kUnknownSource) {
// look for node icons first
+10
View File
@@ -68,6 +68,16 @@ BTrashWatcher::BTrashWatcher()
}
thread_id
BTrashWatcher::Run()
{
fTrashFull = CheckTrashDirs();
UpdateTrashIcon();
return BLooper::Run();
}
BTrashWatcher::~BTrashWatcher()
{
stop_watching(this);
+1
View File
@@ -49,6 +49,7 @@ public:
BTrashWatcher();
virtual ~BTrashWatcher();
virtual thread_id Run();
bool CheckTrashDirs();
bool IsTrashNode(const node_ref*) const;