fix: keep original isFavorite value when file is renamed

This commit is contained in:
DecafDev 2024-07-15 21:38:46 -06:00
parent 9e396dcc3d
commit ddadc93576

View file

@ -118,8 +118,9 @@ class FavoritesStore {
});
this.store.update((store) => {
if (store.get(oldPath)) {
store.set(newPath, true);
const isFavorite = store.get(oldPath);
if (isFavorite !== undefined) {
store.set(newPath, isFavorite);
store.delete(oldPath);
this.debounceSave(store);
}