From 2e7ae3b1da072bd8645816e9983a01f776accee3 Mon Sep 17 00:00:00 2001 From: absidue <48293849+absidue@users.noreply.github.com> Date: Tue, 1 Oct 2024 04:35:28 +0200 Subject: [PATCH] Cleanup unused code in the store (#5776) --- .../store/modules/subscription-cache.js | 18 +----------------- src/renderer/store/modules/utils.js | 8 -------- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/src/renderer/store/modules/subscription-cache.js b/src/renderer/store/modules/subscription-cache.js index 72d35f6361b1..d8ad6ff32cf0 100644 --- a/src/renderer/store/modules/subscription-cache.js +++ b/src/renderer/store/modules/subscription-cache.js @@ -14,34 +14,18 @@ const state = { const getters = { getSubscriptionCacheReady: (state) => state.subscriptionCacheReady, - getVideoCache: (state) => { - return state.videoCache - }, - getVideoCacheByChannel: (state) => (channelId) => { return state.videoCache[channelId] }, - getShortsCache: (state) => { - return state.shortsCache - }, - getShortsCacheByChannel: (state) => (channelId) => { return state.shortsCache[channelId] }, - getLiveCache: (state) => { - return state.liveCache - }, - getLiveCacheByChannel: (state) => (channelId) => { return state.liveCache[channelId] }, - getPostsCache: (state) => { - return state.postsCache - }, - getPostsCacheByChannel: (state) => (channelId) => { return state.postsCache[channelId] }, @@ -175,7 +159,7 @@ const actions = { } }, - async clearSubscriptionsCache({ commit }, payload) { + async clearSubscriptionsCache({ commit }) { try { await DBSubscriptionCacheHandlers.deleteAll() commit('clearCaches') diff --git a/src/renderer/store/modules/utils.js b/src/renderer/store/modules/utils.js index 19d3e3f6f900..53385c9c22a6 100644 --- a/src/renderer/store/modules/utils.js +++ b/src/renderer/store/modules/utils.js @@ -52,10 +52,6 @@ const state = { externalPlayerNames: [], externalPlayerValues: [], externalPlayerCmdArguments: {}, - lastVideoRefreshTimestampByProfile: {}, - lastShortRefreshTimestampByProfile: {}, - lastLiveRefreshTimestampByProfile: {}, - lastCommunityRefreshTimestampByProfile: {}, lastPopularRefreshTimestamp: '', lastTrendingRefreshTimestamp: '', subscriptionFirstAutoFetchRunData: { @@ -75,10 +71,6 @@ const getters = { return state.outlinesHidden }, - getCurrentVolume(state) { - return state.currentVolume - }, - getSessionSearchHistory(state) { return state.sessionSearchHistory },