Skip to content

Commit a23645a

Browse files
authored
fix: Fix album not refreshed when importing via url (#3523)
1 parent ffe75b1 commit a23645a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

resources/js/components/modals/ImportFromLink.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import PhotoService from "@/services/photo-service";
4646
import { useRouter } from "vue-router";
4747
import { usePhotoRoute } from "@/composables/photo/photoRoute";
4848
import Textarea from "../forms/basic/Textarea.vue";
49+
import AlbumService from "@/services/album-service";
4950
5051
const visible = defineModel("visible", { default: false }) as Ref<boolean>;
5152
const emits = defineEmits<{ refresh: [] }>();
@@ -59,6 +60,8 @@ function submit() {
5960
PhotoService.importFromUrl(urls.value.split("\n"), getParentId() ?? null).then(() => {
6061
urls.value = "";
6162
visible.value = false;
63+
// Clear cache for the parent album to ensure the new photos are displayed
64+
AlbumService.clearCache(getParentId() ?? "unsorted");
6265
emits("refresh");
6366
});
6467
}

0 commit comments

Comments
 (0)