🔖 Release Version 1.0.4-hf2
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
export default {
|
||||
version: /* @VERSION */ '1.0.4-hf1',
|
||||
version_detail: /* @VERSION_DETAIL */ '1.0.4-hf1',
|
||||
version: /* @VERSION */ '1.0.4-hf2',
|
||||
version_detail: /* @VERSION_DETAIL */ '1.0.4-hf2',
|
||||
version_name: /* @VERSION_NAME */ 'Ghost-Dog',
|
||||
};
|
||||
@@ -122,13 +122,13 @@ export const useDriveItem = (id: string) => {
|
||||
}));
|
||||
}
|
||||
// set children and remove duplicates
|
||||
setChildren(prev => [
|
||||
...prev,
|
||||
...details.children.filter(
|
||||
(item, index, self) =>
|
||||
index === self.findIndex(t => t.id === item.id),
|
||||
),
|
||||
]);
|
||||
setChildren(prev => {
|
||||
// Create a Map for existing IDs for fast lookups
|
||||
const existingIds = new Map(prev.map(item => [item.id, true]));
|
||||
|
||||
// Filter children while adding them to the state
|
||||
return [...prev, ...details.children.filter(item => !existingIds.has(item.id))];
|
||||
});
|
||||
} catch (e) {
|
||||
// set pagination end to true
|
||||
set(DriveItemPagination, prev => ({
|
||||
@@ -140,7 +140,7 @@ export const useDriveItem = (id: string) => {
|
||||
} finally {
|
||||
set(DriveItemPagination, prev => ({
|
||||
...prev,
|
||||
page: (prev.page + prev.limit),
|
||||
page: prev.page + prev.limit,
|
||||
}));
|
||||
}
|
||||
setLoading(false);
|
||||
|
||||
Reference in New Issue
Block a user