diving deeper into refactoring threads
This commit is contained in:
parent
31f4ad343a
commit
415844e3da
6 changed files with 32 additions and 93 deletions
|
|
@ -26,28 +26,14 @@ const ThreadTree = {
|
|||
toggleExpanded: Function,
|
||||
|
||||
simple: Boolean,
|
||||
// to control display of the whole thread forest
|
||||
toggleThreadDisplay: Function,
|
||||
canDive: Boolean,
|
||||
threadDisplayStatus: Object,
|
||||
showThreadRecursively: Function,
|
||||
totalReplyCount: Object,
|
||||
totalReplyDepth: Object,
|
||||
dive: Function,
|
||||
},
|
||||
emits: ['suspendableStateChange'],
|
||||
emits: ['suspendableStateChange', 'dive'],
|
||||
computed: {
|
||||
suspendable() {
|
||||
const selfSuspendable = this.$refs.statusComponent
|
||||
? this.$refs.statusComponent.suspendable
|
||||
: true
|
||||
if (this.$refs.childComponent) {
|
||||
return (
|
||||
selfSuspendable &&
|
||||
this.$refs.childComponent.every((s) => s.suspendable)
|
||||
)
|
||||
}
|
||||
return selfSuspendable
|
||||
},
|
||||
reverseLookupTable() {
|
||||
return this.conversation.reduce(
|
||||
(table, status, index) => {
|
||||
|
|
@ -72,21 +58,6 @@ const ThreadTree = {
|
|||
statusById(id) {
|
||||
return this.conversation[this.reverseLookupTable[id]]
|
||||
},
|
||||
collapseThread() {
|
||||
/* no-op */
|
||||
},
|
||||
showThread() {
|
||||
/* no-op */
|
||||
},
|
||||
showAllSubthreads() {
|
||||
/* no-op */
|
||||
},
|
||||
toggleCurrentProp(name) {
|
||||
this.toggleStatusContentProperty(this.status.id, name)
|
||||
},
|
||||
setCurrentProp(name) {
|
||||
this.setStatusContentProperty(this.status.id, name)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue