diff --git a/src/App.js b/src/App.js index 273b3e3bc..c7862a8fb 100644 --- a/src/App.js +++ b/src/App.js @@ -136,7 +136,7 @@ export default { return this.currentUser.background_image }, instanceBackground() { - return useSyncConfigStore().mergedConfig.hideInstanceWallpaper ? null : this.instanceBackgroundUrl + return this.mergedConfig.hideInstanceWallpaper ? null : this.background }, background() { return this.userBackground || this.instanceBackground @@ -209,7 +209,7 @@ export default { 'editingAvailable', ]), ...mapState(useInstanceStore, { - instanceBackgroundUrl: (store) => store.instanceIdentity.background, + background: (store) => store.instanceIdentity.background, showFeaturesPanel: (store) => store.instanceIdentity.showFeaturesPanel, instanceSpecificPanelPresent: (store) => store.instanceIdentity.showInstanceSpecificPanel && diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue index 8d4734083..2f3de3a86 100644 --- a/src/components/conversation/conversation.vue +++ b/src/components/conversation/conversation.vue @@ -88,34 +88,38 @@ class="thread-ancestor" :class="{'thread-ancestor-has-other-replies': getReplies(status.id).length > 1, '-faded': shouldFadeAncestors}" > - state.layoutType === 'mobile', }), @@ -41,11 +47,8 @@ const QuickViewSettings = { get() { return this.mergedConfig.conversationDisplay }, - set(value) { - useSyncConfigStore().setPreference({ - path: 'simple.conversationDisplay', - value, - }) + set(newVal) { + this.setConversationDisplay(newVal) }, }, autoUpdate: { @@ -54,7 +57,7 @@ const QuickViewSettings = { }, set() { const value = !this.autoUpdate - useSyncConfigStore().setPreference({ path: 'simple.streaming', value }) + this.$store.dispatch('setOption', { name: 'streaming', value }) }, }, collapseWithSubjects: { @@ -63,8 +66,8 @@ const QuickViewSettings = { }, set() { const value = !this.collapseWithSubjects - useSyncConfigStore().setPreference({ - path: 'simple.collapseMessageWithSubject', + this.$store.dispatch('setOption', { + name: 'collapseMessageWithSubject', value, }) }, @@ -75,8 +78,8 @@ const QuickViewSettings = { }, set() { const value = !this.showUserAvatars - useSyncConfigStore().setPreference({ - path: 'simple.mentionLinkShowAvatar', + this.$store.dispatch('setOption', { + name: 'mentionLinkShowAvatar', value, }) }, @@ -87,10 +90,7 @@ const QuickViewSettings = { }, set() { const value = !this.muteBotStatuses - useSyncConfigStore().setPreference({ - path: 'simple.muteBotStatuses', - value, - }) + this.$store.dispatch('setOption', { name: 'muteBotStatuses', value }) }, }, muteSensitiveStatuses: { @@ -99,8 +99,8 @@ const QuickViewSettings = { }, set() { const value = !this.muteSensitiveStatuses - useSyncConfigStore().setPreference({ - path: 'simple.muteSensitiveStatuses', + this.$store.dispatch('setOption', { + name: 'muteSensitiveStatuses', value, }) }, diff --git a/src/components/side_drawer/side_drawer.js b/src/components/side_drawer/side_drawer.js index a906cd3ba..05d8e92f5 100644 --- a/src/components/side_drawer/side_drawer.js +++ b/src/components/side_drawer/side_drawer.js @@ -10,7 +10,6 @@ import { useAnnouncementsStore } from 'src/stores/announcements' import { useInstanceStore } from 'src/stores/instance.js' import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js' import { useInterfaceStore } from 'src/stores/interface' -import { useSyncConfigStore } from 'src/stores/sync_config.js' import { useShoutStore } from 'src/stores/shout' import { library } from '@fortawesome/fontawesome-svg-core' @@ -73,10 +72,7 @@ const SideDrawer = { return useShoutStore().joined }, unseenNotifications() { - return unseenNotificationsFromStore( - this.$store, - useSyncConfigStore().mergedConfig.notificationVisibility, - ) + return unseenNotificationsFromStore(this.$store) }, unseenNotificationsCount() { return this.unseenNotifications.length diff --git a/src/components/status/status.js b/src/components/status/status.js index 634e74f5e..a43154ce2 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -131,26 +131,25 @@ const Status = { }, props: [ 'statusoid', - 'replies', - 'expandable', + 'inConversation', 'focused', 'highlight', 'compact', + 'replies', 'isPreview', 'noHeading', 'inlineExpanded', 'showPinned', 'inProfile', - 'inConversation', - 'inQuote', 'profileUserId', - 'simpleTree', - 'showOtherRepliesAsButton', - 'dive', + 'inQuote', + 'simpleTree', 'controlledThreadDisplayStatus', 'controlledToggleThreadDisplay', + 'showOtherRepliesAsButton', + 'controlledShowingTall', 'controlledToggleShowingTall', 'controlledExpandingSubject', @@ -161,8 +160,9 @@ const Status = { 'controlledToggleReplying', 'controlledMediaPlaying', 'controlledSetMediaPlaying', + 'dive', ], - emits: ['interacted', 'goto', 'toggleExpanded'], + emits: ['interacted'], data() { return { uncontrolledReplying: false, diff --git a/src/services/notification_utils/notification_utils.js b/src/services/notification_utils/notification_utils.js index 95902daef..e5baa9a20 100644 --- a/src/services/notification_utils/notification_utils.js +++ b/src/services/notification_utils/notification_utils.js @@ -105,17 +105,15 @@ export const filteredNotificationsFromStore = ( ) } -export const unseenNotificationsFromStore = (store, notificationVisibility) => { +export const unseenNotificationsFromStore = (store) => { const rootGetters = store.rootGetters || store.getters const ignoreInactionableSeen = rootGetters.mergedConfig.ignoreInactionableSeen - return filteredNotificationsFromStore(store, notificationVisibility).filter( - ({ seen, type }) => { - if (!ignoreInactionableSeen) return !seen - if (seen) return false - return ACTIONABLE_NOTIFICATION_TYPES.has(type) - }, - ) + return filteredNotificationsFromStore(store).filter(({ seen, type }) => { + if (!ignoreInactionableSeen) return !seen + if (seen) return false + return ACTIONABLE_NOTIFICATION_TYPES.has(type) + }) } export const prepareNotificationObject = (notification, i18n) => {