summaryrefslogtreecommitdiff
path: root/public/assets/js/lib/views/stream/hootstream.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets/js/lib/views/stream/hootstream.js')
-rw-r--r--public/assets/js/lib/views/stream/hootstream.js7
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,