first pass of migration - states and obvious replacements
This commit is contained in:
parent
02f952047d
commit
24ce2dc0a5
66 changed files with 398 additions and 568 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import bookmarkFoldersFetcher from '../../services/bookmark_folders_fetcher/bookmark_folders_fetcher.service.js'
|
||||
import followRequestFetcher from '../../services/follow_request_fetcher/follow_request_fetcher.service'
|
||||
import listsFetcher from '../../services/lists_fetcher/lists_fetcher.service.js'
|
||||
|
|
@ -55,7 +56,7 @@ const backendInteractorService = (credentials) => ({
|
|||
},
|
||||
|
||||
startUserSocket({ store }) {
|
||||
const serv = store.rootState.instance.server.replace('http', 'ws')
|
||||
const serv = useInstanceStore().server.replace('http', 'ws')
|
||||
const url = getMastodonSocketURI({}, serv)
|
||||
return ProcessedWS({ url, id: 'Unified', credentials })
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import apiService from '../api/api.service.js'
|
||||
import { promiseInterval } from '../promise_interval/promise_interval.js'
|
||||
|
|
@ -28,7 +29,7 @@ const fetchAndUpdate = ({ store, credentials, older = false, since }) => {
|
|||
const timelineData = rootState.notifications
|
||||
const hideMutedPosts = getters.mergedConfig.hideMutedPosts
|
||||
|
||||
if (rootState.instance.pleromaChatMessagesAvailable) {
|
||||
if (useInstanceStore().pleromaChatMessagesAvailable) {
|
||||
mastoApiNotificationTypes.add('pleroma:chat_mention')
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { camelCase } from 'lodash'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import apiService from '../api/api.service.js'
|
||||
import { promiseInterval } from '../promise_interval/promise_interval.js'
|
||||
|
|
@ -76,7 +77,7 @@ const fetchAndUpdate = ({
|
|||
.then((response) => {
|
||||
if (response.errors) {
|
||||
if (timeline === 'favorites') {
|
||||
rootState.instance.pleromaPublicFavouritesAvailable = false
|
||||
useInstanceStore().pleromaPublicFavouritesAvailable = false
|
||||
return
|
||||
}
|
||||
throw new Error(`${response.status} ${response.statusText}`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue