first pass of migration - states and obvious replacements

This commit is contained in:
Henry Jameson 2026-01-29 00:49:26 +02:00
commit 24ce2dc0a5
66 changed files with 398 additions and 568 deletions

View file

@ -1,5 +1,6 @@
import { Socket } from 'phoenix'
import { useInstanceStore } from 'src/stores/instance.js'
import { useInterfaceStore } from 'src/stores/interface.js'
import { useShoutStore } from 'src/stores/shout.js'
import { WSConnectionStatus } from '../services/api/api.service.js'
@ -237,7 +238,7 @@ const api = {
) {
if (
timeline === 'favourites' &&
!store.rootState.instance.pleromaPublicFavouritesAvailable
!useInstanceStore().pleromaPublicFavouritesAvailable
)
return
if (store.state.fetchers[timeline]) return
@ -322,7 +323,7 @@ const api = {
// Bookmark folders
startFetchingBookmarkFolders(store) {
if (store.state.fetchers.bookmarkFolders) return
if (!store.rootState.instance.pleromaBookmarkFoldersAvailable) return
if (!useInstanceStore().pleromaBookmarkFoldersAvailable) return
const fetcher =
store.state.backendInteractor.startFetchingBookmarkFolders({ store })
store.commit('addFetcher', { fetcherName: 'bookmarkFolders', fetcher })
@ -341,7 +342,7 @@ const api = {
// Set up websocket connection
const token = state.wsToken
if (
rootState.instance.shoutAvailable &&
useInstanceStore().shoutAvailable &&
typeof token !== 'undefined' &&
state.socket === null
) {