diff --git a/frontend/src/common/clipboard.js b/frontend/src/common/clipboard.js
index 5e60e6f12..bc8bc76f7 100644
--- a/frontend/src/common/clipboard.js
+++ b/frontend/src/common/clipboard.js
@@ -120,8 +120,10 @@ class Clipboard {
return;
}
- const id = model.getId();
+ this.removeId(model.getId());
+ }
+ removeId(id) {
if (!this.hasId(id)) return;
const index = this.selection.indexOf(id);
diff --git a/frontend/src/pages/album/photos.vue b/frontend/src/pages/album/photos.vue
index 5c370d20d..2d6dd29db 100644
--- a/frontend/src/pages/album/photos.vue
+++ b/frontend/src/pages/album/photos.vue
@@ -372,9 +372,12 @@
for (let i = 0; i < data.entities.length; i++) {
const uid = data.entities[i];
const index = this.results.findIndex((m) => m.UID === uid);
+
if (index >= 0) {
this.results.splice(index, 1);
}
+
+ this.$clipboard.removeId(uid);
}
break;
diff --git a/frontend/src/pages/albums.vue b/frontend/src/pages/albums.vue
index 2e2475b46..6447f55d9 100644
--- a/frontend/src/pages/albums.vue
+++ b/frontend/src/pages/albums.vue
@@ -38,7 +38,7 @@
cloud_upload
-
+
add
@@ -487,9 +487,11 @@
const values = data.entities[i];
const model = this.results.find((m) => m.UID === values.UID);
- for (let key in values) {
- if (values.hasOwnProperty(key)) {
- model[key] = values[key];
+ if (model) {
+ for (let key in values) {
+ if (values.hasOwnProperty(key) && values[key] != null && typeof values[key] !== "object") {
+ model[key] = values[key];
+ }
}
}
}
@@ -515,7 +517,8 @@
for (let i = 0; i < data.entities.length; i++) {
const values = data.entities[i];
const index = this.results.findIndex((m) => m.UID === values.UID);
- if (index === -1) {
+
+ if (index === -1 && this.staticFilter.type === values.Type) {
this.results.unshift(new Album(values));
}
}
diff --git a/frontend/src/pages/photos.vue b/frontend/src/pages/photos.vue
index efb92026f..d2653ddda 100644
--- a/frontend/src/pages/photos.vue
+++ b/frontend/src/pages/photos.vue
@@ -377,9 +377,12 @@
for (let i = 0; i < data.entities.length; i++) {
const uid = data.entities[i];
const index = this.results.findIndex((m) => m.UID === uid);
+
if (index >= 0) {
this.results.splice(index, 1);
}
+
+ this.$clipboard.removeId(uid);
}
break;