Skip to content

Commit 2b10245

Browse files
committed
Lightbox: Use this.subscriptions as array photoprism#5258
Signed-off-by: Michael Mayer <michael@photoprism.app>
1 parent e1fcbe0 commit 2b10245

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

frontend/src/app.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ export default {
4646
},
4747
},
4848
created() {
49-
this.subscriptions["view.refresh"] = this.$event.subscribe("view.refresh", (ev, data) => this.onRefresh(data));
50-
// this.subscriptions["lightbox"] = this.$event.subscribe("lightbox", (ev, data) => { console.log(ev); });
51-
49+
this.subscriptions.push(this.$event.subscribe("view.refresh", (ev, data) => this.onRefresh(data)));
5250
this.$config.setVuetify(this.$vuetify);
5351
},
5452
mounted() {

frontend/src/component/lightbox.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,9 @@ export default {
204204
};
205205
},
206206
created() {
207-
// this.subscriptions["lightbox.change"] = this.$event.subscribe("lightbox.change", this.onChange);
208-
this.subscriptions["lightbox.open"] = this.$event.subscribe("lightbox.open", this.openLightbox.bind(this));
209-
this.subscriptions["lightbox.pause"] = this.$event.subscribe("lightbox.pause", this.pauseLightbox.bind(this));
210-
this.subscriptions["lightbox.close"] = this.$event.subscribe("lightbox.close", this.onClose.bind(this));
207+
this.subscriptions.push(this.$event.subscribe("lightbox.open", this.openLightbox.bind(this)));
208+
this.subscriptions.push(this.$event.subscribe("lightbox.pause", this.pauseLightbox.bind(this)));
209+
this.subscriptions.push(this.$event.subscribe("lightbox.close", this.onClose.bind(this)));
211210
},
212211
beforeUnmount() {
213212
// Exit fullscreen mode if enabled, has no effect otherwise.

0 commit comments

Comments
 (0)