()
| 439 | } |
| 440 | |
| 441 | export async function refreshRecycleBinIndicator() { |
| 442 | try { |
| 443 | const trashItems = await fetchTrash(); |
| 444 | const hasItems = Array.isArray(trashItems) && trashItems.length > 0; |
| 445 | updateRecycleBinState(hasItems); |
| 446 | setHeaderIcon(hasItems); |
| 447 | } catch (e) { |
| 448 | updateRecycleBinState(false); |
| 449 | setHeaderIcon(false); |
| 450 | } |
| 451 | } |
| 452 | |
| 453 | /** |
| 454 | * Automatically purges (permanently deletes) trash items older than 3 days. |
no test coverage detected