diff options
author | Carl Schwan <carl@carlschwan.eu> | 2021-10-19 10:57:30 +0200 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2021-10-20 10:21:23 +0200 |
commit | 89112e5df95d70967793a874d4aad56326e35676 (patch) | |
tree | 409273f2ad92d4efbb2ca4d945d2f2587c39abce /apps/user_status/src/store | |
parent | 2083e1ede253a6ea76f67d37c382cd851620ad99 (diff) | |
download | nextcloud-server-89112e5df95d70967793a874d4aad56326e35676.tar.gz nextcloud-server-89112e5df95d70967793a874d4aad56326e35676.zip |
Fix status menu item not listening to status change events
This makes it so that the status menu item listens to user_status:status.updated
events even when they are triggered outside of the user status modal.
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps/user_status/src/store')
-rw-r--r-- | apps/user_status/src/store/userStatus.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/user_status/src/store/userStatus.js b/apps/user_status/src/store/userStatus.js index f1910d23354..99761da1265 100644 --- a/apps/user_status/src/store/userStatus.js +++ b/apps/user_status/src/store/userStatus.js @@ -166,6 +166,21 @@ const actions = { }, /** + * Update status from 'user_status:status.updated' update. + * This doesn't trigger another 'user_status:status.updated' + * event. + * + * @param {Object} vuex The Vuex destructuring object + * @param {Function} vuex.commit The Vuex commit function + * @param {Object} vuex.state The Vuex state object + * @param {String} status The new status + * @returns {Promise<void>} + */ + async setStatusFromObject({ commit, state }, status) { + commit('loadStatusFromServer', status) + }, + + /** * Sets a message using a predefined message * * @param {Object} vuex The Vuex destructuring object |