mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Merge pull request #1359 from PR0M3TH3AN/for-you-feed-update-6639372694731601459
feat: Remove hashtag pills from For You page
This commit is contained in:
3 files changed
+16
-6
No files matched your search
@@ -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()) &&
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<section data-ds="new">
|
||||
<h2 class="mb-4 text-xl font-semibold text-text">For You</h2>
|
||||
|
||||
<div id="recentVideoTags" class="mb-4" hidden></div>
|
||||
<div id="videoList" class="bv-grid-video">
|
||||
<div class="sidebar-loading-wrapper" role="status" aria-live="polite">
|
||||
<div class="sidebar-loading-indicator">
|
||||
|
||||
Reference in new issue
Block a user