From 0f2fd8a3523e9e2cd1ca6fe287eb7304895f2cba Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Sat, 7 Aug 2021 00:33:06 -0400 Subject: Implement thread folding/expanding --- src/components/thread_tree/thread_tree.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/components/thread_tree/thread_tree.js') diff --git a/src/components/thread_tree/thread_tree.js b/src/components/thread_tree/thread_tree.js index 4f95122a..88b60109 100644 --- a/src/components/thread_tree/thread_tree.js +++ b/src/components/thread_tree/thread_tree.js @@ -21,7 +21,14 @@ const ThreadTree = { getHighlight: Function, getReplies: Function, setHighlight: Function, - toggleExpanded: Function + toggleExpanded: Function, + + // to control display of the whole thread forest + toggleThreadDisplay: Function, + threadDisplayStatus: Object, + showThreadRecursively: Function, + totalReplyCount: Object, + totalReplyDepth: Object }, computed: { reverseLookupTable () { @@ -35,6 +42,9 @@ const ThreadTree = { debug('getReplies:', this.getReplies(this.status.id)) return this.getReplies(this.status.id).map(({ id }) => this.statusById(id)) }, + threadShowing () { + return this.threadDisplayStatus[this.status.id] === 'showing' + } }, methods: { statusById (id) { -- cgit v1.2.3-70-g09d2