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