Skip to content

Commit

Permalink
Cleanup unused code in the store
Browse files Browse the repository at this point in the history
  • Loading branch information
absidue committed Sep 30, 2024
1 parent b3f92e3 commit d08d3c2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
18 changes: 1 addition & 17 deletions src/renderer/store/modules/subscription-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]
},
Expand Down Expand Up @@ -175,7 +159,7 @@ const actions = {
}
},

async clearSubscriptionsCache({ commit }, payload) {
async clearSubscriptionsCache({ commit }) {
try {
await DBSubscriptionCacheHandlers.deleteAll()
commit('clearCaches')
Expand Down
8 changes: 0 additions & 8 deletions src/renderer/store/modules/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ const state = {
externalPlayerNames: [],
externalPlayerValues: [],
externalPlayerCmdArguments: {},
lastVideoRefreshTimestampByProfile: {},
lastShortRefreshTimestampByProfile: {},
lastLiveRefreshTimestampByProfile: {},
lastCommunityRefreshTimestampByProfile: {},
lastPopularRefreshTimestamp: '',
lastTrendingRefreshTimestamp: '',
subscriptionFirstAutoFetchRunData: {
Expand All @@ -75,10 +71,6 @@ const getters = {
return state.outlinesHidden
},

getCurrentVolume(state) {
return state.currentVolume
},

getSessionSearchHistory(state) {
return state.sessionSearchHistory
},
Expand Down

0 comments on commit d08d3c2

Please sign in to comment.