diff --git a/routes/_components/status/Media.html b/routes/_components/status/Media.html
index 7797bd63..2e568bbf 100644
--- a/routes/_components/status/Media.html
+++ b/routes/_components/status/Media.html
@@ -107,11 +107,11 @@
import { store } from '../../_store/store'
import LazyImage from '../LazyImage.html'
import AutoplayVideo from '../AutoplayVideo.html'
- import { registerClickDelegate, unregisterClickDelegate } from '../../_utils/delegate'
+ import { registerClickDelegate } from '../../_utils/delegate'
export default {
oncreate() {
- registerClickDelegate(this.get('delegateKey'), () => {
+ registerClickDelegate(this, this.get('delegateKey'), () => {
if (this.get('media').type === 'video') {
this.onClickPlayVideoButton()
} else {
@@ -119,9 +119,6 @@
}
})
},
- ondestroy() {
- unregisterClickDelegate(this.get('delegateKey'))
- },
computed: {
// width/height to show inline
inlineWidth: smallWidth => smallWidth || DEFAULT_MEDIA_WIDTH,
diff --git a/routes/_components/status/Status.html b/routes/_components/status/Status.html
index 2592ea33..2d386a39 100644
--- a/routes/_components/status/Status.html
+++ b/routes/_components/status/Status.html
@@ -111,7 +111,7 @@
import StatusComposeBox from './StatusComposeBox.html'
import { store } from '../../_store/store'
import { goto } from 'sapper/runtime.js'
- import { registerClickDelegate, unregisterClickDelegate } from '../../_utils/delegate'
+ import { registerClickDelegate } from '../../_utils/delegate'
import { classname } from '../../_utils/classname'
import { checkDomAncestors } from '../../_utils/checkDomAncestors'
import { scheduleIdleTask } from '../../_utils/scheduleIdleTask'
@@ -126,7 +126,7 @@
let delegateKey = this.get('delegateKey')
if (!this.get('isStatusInOwnThread')) {
// the whole is clickable in this case
- registerClickDelegate(delegateKey, (e) => this.onClickOrKeydown(e))
+ registerClickDelegate(this, delegateKey, (e) => this.onClickOrKeydown(e))
}
if (!this.get('showContent')) {
scheduleIdleTask(() => {
@@ -136,12 +136,6 @@
})
}
},
- ondestroy() {
- let delegateKey = this.get('delegateKey')
- if (!this.get('isStatusInOwnThread')) {
- unregisterClickDelegate(delegateKey)
- }
- },
components: {
StatusSidebar,
StatusHeader,
diff --git a/routes/_components/status/StatusMediaAttachments.html b/routes/_components/status/StatusMediaAttachments.html
index fdec5b1e..883c2f17 100644
--- a/routes/_components/status/StatusMediaAttachments.html
+++ b/routes/_components/status/StatusMediaAttachments.html
@@ -126,14 +126,11 @@