From 826bdf4997a5ea9efb4d8aa21f5b88e6cf9089d7 Mon Sep 17 00:00:00 2001 From: FireMasterK <20838718+FireMasterK@users.noreply.github.com> Date: Mon, 31 Jan 2022 03:46:06 +0000 Subject: [PATCH] Fix for default home page. --- src/App.vue | 11 ----------- src/components/TrendingPage.vue | 9 +++++++++ 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/App.vue b/src/App.vue index 57983e83..8a4e4cf1 100644 --- a/src/App.vue +++ b/src/App.vue @@ -26,17 +26,6 @@ export default { NavBar, }, mounted() { - if (window.location.pathname === "/" || window.location.pathname.length == 0) - switch (this.getPreferenceString("homepage", "trending")) { - case "trending": - break; - case "feed": - this.$router.push("/feed"); - return; - default: - break; - } - if (this.getPreferenceBoolean("watchHistory", false)) if ("indexedDB" in window) { const request = indexedDB.open("piped-db", 1); diff --git a/src/components/TrendingPage.vue b/src/components/TrendingPage.vue index 856ab5a4..ffa03b6a 100644 --- a/src/components/TrendingPage.vue +++ b/src/components/TrendingPage.vue @@ -31,6 +31,15 @@ export default { activated() { document.title = this.$t("titles.trending") + " - Piped"; if (this.videos.length > 0) this.updateWatched(this.videos); + switch (this.getPreferenceString("homepage", "trending")) { + case "trending": + break; + case "feed": + this.$router.push("/feed"); + return; + default: + break; + } }, methods: { async fetchTrending(region) {