diff options
| author | julian laplace <julescarbon@gmail.com> | 2022-10-27 00:06:16 +0200 |
|---|---|---|
| committer | julian laplace <julescarbon@gmail.com> | 2022-10-27 00:06:16 +0200 |
| commit | ae29144f18bbd0cac3c65ae4bf869fade1c5ffb0 (patch) | |
| tree | 9585b4f01783ae5c2fdfc40eccb4cbebf0c5c3df /public/assets/js/lib/views/stream/hootstream.js | |
| parent | c7f67886297736cea067f5213b4062621ebe43f7 (diff) | |
fixing things :)
Diffstat (limited to 'public/assets/js/lib/views/stream/hootstream.js')
| -rw-r--r-- | public/assets/js/lib/views/stream/hootstream.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/public/assets/js/lib/views/stream/hootstream.js b/public/assets/js/lib/views/stream/hootstream.js index c93b5db..2789dee 100644 --- a/public/assets/js/lib/views/stream/hootstream.js +++ b/public/assets/js/lib/views/stream/hootstream.js @@ -86,10 +86,11 @@ var HootStream = View.extend({ } // console.log(sortedOrder, threadLookup); + // Filter the elements that we're going to display const $els = sortedOrder .filter(({ type, thread_id }) => { - if (filters.hoots && (type === "hoot" || type === "lastlog")) { - return true; + if (type === "hoot" || type === "lastlog") { + return filters.hoots; } const thread = threadLookup[thread_id]; if (filters.hoots && thread.comments && thread.comments.length) { @@ -97,7 +98,6 @@ var HootStream = View.extend({ } if ( filters.music && - thread.files && thread.files.some((file) => AUDIO_REGEXP.test(file.filename)) ) { return true; @@ -115,6 +115,7 @@ var HootStream = View.extend({ function ({ type, thread_id, data: itemData }) { // console.log(type, thread_id); if (type === "thread") { + // Filter thread contents const thread = threadLookup[thread_id]; const threadData = { ...thread, |
