From ea49201eb912747a7b913ab237c1187a88ef6d24 Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Mon, 1 Aug 2022 19:43:19 +0530 Subject: [PATCH] Fix some bugs and small improvements. --- src/components/ImportPage.vue | 9 +++++++++ src/components/SubscriptionsPage.vue | 4 ++-- src/main.js | 6 ------ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/components/ImportPage.vue b/src/components/ImportPage.vue index 5f274cd9..4d8791d8 100644 --- a/src/components/ImportPage.vue +++ b/src/components/ImportPage.vue @@ -149,8 +149,17 @@ export default { }); } else { this.importSubscriptionsLocally(this.subscriptions); + window.location = "/feed"; } }, + importSubscriptionsLocally(newChannels) { + const subscriptions = this.override + ? [...new Set(newChannels)] + : [...new Set(this.getLocalSubscriptions().concat(newChannels))]; + // Sort for better cache hits + subscriptions.sort(); + localStorage.setItem("localSubscriptions", JSON.stringify(subscriptions)); + }, }, }; diff --git a/src/components/SubscriptionsPage.vue b/src/components/SubscriptionsPage.vue index fba5ba00..4d7affaf 100644 --- a/src/components/SubscriptionsPage.vue +++ b/src/components/SubscriptionsPage.vue @@ -1,7 +1,7 @@