no article link for "article in own thread"

This commit is contained in:
Nolan Lawson 2018-02-10 14:18:59 -08:00
parent faac8f1a31
commit db3291c542
1 changed files with 9 additions and 4 deletions

View File

@ -97,13 +97,18 @@
oncreate() { oncreate() {
let elementKey = this.get('elementKey') let elementKey = this.get('elementKey')
let onClickOrKeydown = this.onClickOrKeydown.bind(this) let onClickOrKeydown = this.onClickOrKeydown.bind(this)
registerDelegate('click', elementKey, onClickOrKeydown) if (!this.get('isStatusInOwnThread')) {
registerDelegate('keydown', elementKey, onClickOrKeydown) // the whole <article> is clickable in this case
registerDelegate('click', elementKey, onClickOrKeydown)
registerDelegate('keydown', elementKey, onClickOrKeydown)
}
}, },
ondestroy() { ondestroy() {
let elementKey = this.get('elementKey') let elementKey = this.get('elementKey')
unregisterDelegate('click', elementKey) if (!this.get('isStatusInOwnThread')) {
unregisterDelegate('keydown', elementKey) unregisterDelegate('click', elementKey)
unregisterDelegate('keydown', elementKey)
}
}, },
components: { components: {
StatusSidebar, StatusSidebar,