aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2022-01-24 19:12:17 +0200
committerHenry Jameson <me@hjkos.com>2022-01-24 19:12:17 +0200
commit9ea0f10abb195799842baf2f4b8711d1744b37bb (patch)
tree2c64119cc7c6bc989e65189712ce81cbbb40c91a /src/modules
parenta96a62929d723c3676174dfd71c0db4462599a12 (diff)
parent182fcca5da9fa284f46f5ca1c8b1790353dec316 (diff)
Merge remote-tracking branch 'origin/develop' into settings-and-filtering
* origin/develop: (169 commits) Improve the user card for deactivated users Update CHANGELOG.md Update CHANGELOG.md Allow canceling a follow request Simple policy reasons for instance specific policies entity_normalizer: Escape name when parsing user Translated using Weblate (Spanish) Translated using Weblate (Catalan) Translated using Weblate (Korean) Translated using Weblate (Japanese (ja_PEDANTIC)) Translated using Weblate (Indonesian) Translated using Weblate (Esperanto) Translated using Weblate (Vietnamese) Translated using Weblate (Italian) Translated using Weblate (Vietnamese) Translated using Weblate (Indonesian) Translated using Weblate (Italian) Translated using Weblate (Vietnamese) Translated using Weblate (Indonesian) Translated using Weblate (Chinese (Simplified)) ...
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/config.js4
-rw-r--r--src/modules/users.js7
2 files changed, 9 insertions, 2 deletions
diff --git a/src/modules/config.js b/src/modules/config.js
index 316dc4fc..c79302b5 100644
--- a/src/modules/config.js
+++ b/src/modules/config.js
@@ -37,6 +37,7 @@ export const defaultState = {
loopVideoSilentOnly: true,
streaming: false,
emojiReactionsOnTimeline: true,
+ alwaysShowNewPostButton: false,
autohideFloatingPostButton: false,
pauseOnUnfocused: true,
stopGifs: false,
@@ -96,7 +97,8 @@ const config = {
const { defaultConfig } = rootGetters
return {
...defaultConfig,
- ...state
+ // Do not override with undefined
+ ...Object.fromEntries(Object.entries(state).filter(([k, v]) => v !== undefined))
}
}
},
diff --git a/src/modules/users.js b/src/modules/users.js
index 2b416f94..05ff44d5 100644
--- a/src/modules/users.js
+++ b/src/modules/users.js
@@ -246,6 +246,11 @@ export const getters = {
}
return result
},
+ findUserByUrl: state => query => {
+ return state.users
+ .find(u => u.statusnet_profile_url &&
+ u.statusnet_profile_url.toLowerCase() === query.toLowerCase())
+ },
relationship: state => id => {
const rel = id && state.relationships[id]
return rel || { id, loading: true }
@@ -388,7 +393,7 @@ const users = {
toggleActivationStatus ({ rootState, commit }, { user }) {
const api = user.deactivated ? rootState.api.backendInteractor.activateUser : rootState.api.backendInteractor.deactivateUser
api({ user })
- .then(({ deactivated }) => commit('updateActivationStatus', { user, deactivated }))
+ .then((user) => { let deactivated = !user.is_active; commit('updateActivationStatus', { user, deactivated }) })
},
registerPushNotifications (store) {
const token = store.state.currentUser.credentials