massive rename and separation merged config into its own "store"
This commit is contained in:
parent
1be0debc63
commit
4e235562aa
65 changed files with 272 additions and 221 deletions
|
|
@ -4,7 +4,7 @@ import { promiseInterval } from '../promise_interval/promise_interval.js'
|
|||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
const update = ({ store, notifications, older }) => {
|
||||
store.dispatch('addNewNotifications', { notifications, older })
|
||||
|
|
@ -29,7 +29,7 @@ const fetchAndUpdate = ({ store, credentials, older = false, since }) => {
|
|||
const args = { credentials }
|
||||
const rootState = store.rootState || store.state
|
||||
const timelineData = rootState.notifications
|
||||
const hideMutedPosts = useSyncConfigStore().mergedConfig.hideMutedPosts
|
||||
const hideMutedPosts = useMergedConfigStore().mergedConfig.hideMutedPosts
|
||||
|
||||
if (useInstanceCapabilitiesStore().pleromaChatMessagesAvailable) {
|
||||
mastoApiNotificationTypes.add('pleroma:chat_mention')
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import { chunk, throttle } from 'lodash'
|
|||
import { getCssRules } from '../theme_data/css_utils.js'
|
||||
import { getEngineChecksum, init } from '../theme_data/theme_data_3.service.js'
|
||||
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
import { defaultState } from 'src/modules/default_config_state.js'
|
||||
|
|
@ -142,7 +143,7 @@ export const tryLoadCache = async () => {
|
|||
if (
|
||||
cache.engineChecksum === getEngineChecksum() &&
|
||||
cache.checksum !== undefined &&
|
||||
cache.checksum === useSyncConfigStore().mergedConfig.themeChecksum
|
||||
cache.checksum === useMergedConfigStore().mergedConfig.themeChecksum
|
||||
) {
|
||||
const eagerStyles = createStyleSheet(EAGER_STYLE_ID, 10)
|
||||
const lazyStyles = createStyleSheet(LAZY_STYLE_ID, 20)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { promiseInterval } from '../promise_interval/promise_interval.js'
|
|||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
const update = ({
|
||||
store,
|
||||
|
|
@ -46,7 +46,8 @@ const fetchAndUpdate = ({
|
|||
const args = { timeline, credentials }
|
||||
const rootState = store.rootState || store.state
|
||||
const timelineData = rootState.statuses.timelines[camelCase(timeline)]
|
||||
const { hideMutedPosts, replyVisibility } = useSyncConfigStore().mergedConfig
|
||||
const { hideMutedPosts, replyVisibility } =
|
||||
useMergedConfigStore().mergedConfig
|
||||
const loggedIn = !!rootState.users.currentUser
|
||||
|
||||
if (older) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue