separate featureset into instancecapabilites store
This commit is contained in:
parent
848d48e404
commit
1e93e0a9c3
40 changed files with 239 additions and 247 deletions
|
|
@ -5,6 +5,7 @@ import backendInteractorService from '../services/backend_interactor_service/bac
|
|||
import { maybeShowChatNotification } from '../services/chat_utils/chat_utils.js'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useShoutStore } from 'src/stores/shout.js'
|
||||
|
||||
|
|
@ -239,7 +240,7 @@ const api = {
|
|||
) {
|
||||
if (
|
||||
timeline === 'favourites' &&
|
||||
!useInstanceStore().featureSet.pleromaPublicFavouritesAvailable
|
||||
!useInstanceCapabilitiesStore().pleromaPublicFavouritesAvailable
|
||||
)
|
||||
return
|
||||
if (store.state.fetchers[timeline]) return
|
||||
|
|
@ -324,7 +325,8 @@ const api = {
|
|||
// Bookmark folders
|
||||
startFetchingBookmarkFolders(store) {
|
||||
if (store.state.fetchers.bookmarkFolders) return
|
||||
if (!useInstanceStore().featureSet.pleromaBookmarkFoldersAvailable) return
|
||||
if (!useInstanceCapabilitiesStore().pleromaBookmarkFoldersAvailable)
|
||||
return
|
||||
const fetcher =
|
||||
store.state.backendInteractor.startFetchingBookmarkFolders({ store })
|
||||
store.commit('addFetcher', { fetcherName: 'bookmarkFolders', fetcher })
|
||||
|
|
|
|||
|
|
@ -59,7 +59,6 @@ const config = {
|
|||
},
|
||||
mergedConfig(state) {
|
||||
const instancePrefs = useInstanceStore().prefsStorage
|
||||
console.log(state)
|
||||
const result = Object.fromEntries(
|
||||
Object.keys(defaultState).map((key) => [
|
||||
key,
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import {
|
|||
|
||||
import { useEmojiStore } from 'src/stores/emoji.js'
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
import { useServerSideStorageStore } from 'src/stores/serverSideStorage'
|
||||
|
|
@ -766,7 +767,7 @@ const users = {
|
|||
dispatch('startFetchingNotifications')
|
||||
|
||||
if (
|
||||
useInstanceStore().featureSet.pleromaChatMessagesAvailable
|
||||
useInstanceCapabilitiesStore().pleromaChatMessagesAvailable
|
||||
) {
|
||||
// Start fetching chats
|
||||
dispatch('startFetchingChats')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue