1
0
mirror of https://github.com/XFox111/TabsAsideExtension.git synced 2026-04-22 07:58:01 +03:00

fix: collections removed by their sorted index

This commit is contained in:
2025-05-08 06:55:35 +03:00
parent 40490aec2d
commit ef94842066
9 changed files with 56 additions and 48 deletions
@@ -12,7 +12,7 @@ export default function OpenCollectionButton(): React.ReactElement
const [defaultAction] = useSettings("defaultRestoreAction");
const { removeItem } = useCollections();
const dialog = useDialog();
const { collection, collectionIndex } = useContext<CollectionContextType>(CollectionContext);
const { collection } = useContext<CollectionContextType>(CollectionContext);
const OpenIcon = ic.bundleIcon(ic.Open20Filled, ic.Open20Regular);
const RestoreIcon = ic.bundleIcon(ic.ArrowExportRtl20Filled, ic.ArrowExportRtl20Regular);
@@ -50,7 +50,7 @@ export default function OpenCollectionButton(): React.ReactElement
const handleRestore = async () =>
{
await openCollection(collection);
removeItem(collectionIndex);
removeItem(collection.timestamp);
};
return (