MCPcopy Create free account
hub / github.com/error311/FileRise / loadTrashItems

Function loadTrashItems

public/js/trashRestoreDelete.js:425–439  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

423 * Loads trash items from the server and updates the restore modal list.
424 */
425export async function loadTrashItems() {
426 try {
427 updateTrashSourceHint();
428 const trashItems = await fetchTrash();
429 renderTrashList(trashItems);
430 const hasItems = Array.isArray(trashItems) && trashItems.length > 0;
431 updateRecycleBinState(hasItems);
432 setHeaderIcon(hasItems);
433 } catch (err) {
434 console.error("Error loading trash items:", err);
435 showToast(tr("error_loading_trash", "Error loading trash items."), 'error');
436 updateRecycleBinState(false);
437 setHeaderIcon(false);
438 }
439}
440
441export async function refreshRecycleBinIndicator() {
442 try {

Callers 3

afterTrashMutationFunction · 0.85
setupTrashRestoreDeleteFunction · 0.85
autoPurgeOldTrashFunction · 0.85

Calls 7

updateTrashSourceHintFunction · 0.85
fetchTrashFunction · 0.85
renderTrashListFunction · 0.85
updateRecycleBinStateFunction · 0.85
setHeaderIconFunction · 0.85
trFunction · 0.85
showToastFunction · 0.70

Tested by

no test coverage detected