diff --git a/js/app.js b/js/app.js index 61afb2f6..adcf6993 100644 --- a/js/app.js +++ b/js/app.js @@ -2956,7 +2956,7 @@ class Application { ); } - mountVideoListView(container = null) { + mountVideoListView({ container = null, includeTags = true } = {}) { if (!this.videoListView) { return null; } @@ -2966,15 +2966,23 @@ class Application { container, view: this.videoListView, currentVideoList: this.videoList, + includeTags, }); this.videoList = videoList || null; this.videoListPopularTags = popularTags || null; return this.videoList; } + const isElement = (value) => + typeof HTMLElement !== "undefined" && value instanceof HTMLElement; + const target = container || document.getElementById("videoList"); this.videoList = target || null; - const tagsRoot = document.getElementById("recentVideoTags"); + + let tagsRoot = null; + if (includeTags) { + tagsRoot = document.getElementById("recentVideoTags"); + } this.videoListPopularTags = tagsRoot || null; if (typeof this.videoListView.setPopularTagsContainer === "function") { this.videoListView.setPopularTagsContainer(this.videoListPopularTags); @@ -5747,7 +5755,7 @@ class Application { devLogger.log("Starting loadForYouVideos... (forceFetch =", forceFetch, ")"); this.setFeedTelemetryContext("for-you"); - const container = this.mountVideoListView(); + const container = this.mountVideoListView({ includeTags: false }); const hasCachedVideos = this.nostrService && Array.isArray(this.nostrService.getFilteredActiveVideos()) && diff --git a/js/ui/videoListViewController.js b/js/ui/videoListViewController.js index 498d50f9..b190e830 100644 --- a/js/ui/videoListViewController.js +++ b/js/ui/videoListViewController.js @@ -17,13 +17,16 @@ export default class VideoListViewController { ); } - mount({ container = null, view, currentVideoList = null } = {}) { + mount({ container = null, view, currentVideoList = null, includeTags = true } = {}) { if (!view) { return { videoList: currentVideoList || null, popularTags: null }; } const target = container || this.getElementById("videoList"); - const popularTags = this.getElementById("recentVideoTags"); + let popularTags = null; + if (includeTags) { + popularTags = this.getElementById("recentVideoTags"); + } if (typeof view.setPopularTagsContainer === "function") { view.setPopularTagsContainer(popularTags || null); diff --git a/views/for-you.html b/views/for-you.html index 6b416c80..64f03865 100644 --- a/views/for-you.html +++ b/views/for-you.html @@ -2,7 +2,6 @@

For You

-