Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to

### Fixed

- 🐛(frontend) refresh the Recent view after item mutations
- 🐛(frontend) keep uploaded items usable while malware analysis runs
- 🐛(backend) stream export files from S3 without buffering

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@ import { generateTreeId } from "../components/GlobalExplorerContext";

export const useGetQueryKeyToRefresh = () => {
return (parentId?: string) => {
const queryKeys = [["items", "infinite"]];
const queryKeys = [
["items", "infinite"],
// The Recent view has its own key prefix (useInfiniteRecentItems), so
// invalidating ["items", "infinite"] does not prefix-match it. Without this,
// a mutation performed while viewing Recent (create, convert, delete,
// rename, upload…) doesn't refresh the list until a manual reload.
["items", "recent", "infinite"],
];
if (parentId) {
queryKeys.push(["items", parentId, "children"]);
}
// let queryKey = parentId ? ["items", parentId, "children"] : [];
// if (queryKeyForRoute.length > 0) {
// queryKey = queryKeyForRoute;
// }
return queryKeys;
};
};
Expand Down