summaryrefslogtreecommitdiffstats
path: root/apps/user_status/src
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2022-05-27 11:20:25 +0200
committerGitHub <noreply@github.com>2022-05-27 11:20:25 +0200
commit9ad5b301ce716d4033e9cbc549aff2a43d5022f5 (patch)
treeaf67ff38a0b6be7fcdeb9bf70cb8e5317ff47a46 /apps/user_status/src
parent1aa1994f59a962fd1add38519e77fe075d269a67 (diff)
parentf5878038ff8adde4683d2d6f124ab1c1d6b06467 (diff)
downloadnextcloud-server-9ad5b301ce716d4033e9cbc549aff2a43d5022f5.tar.gz
nextcloud-server-9ad5b301ce716d4033e9cbc549aff2a43d5022f5.zip
Merge pull request #32618 from nextcloud/bugfix/noid/fix-status-handling
Fix status handling
Diffstat (limited to 'apps/user_status/src')
-rw-r--r--apps/user_status/src/components/SetStatusModal.vue4
-rw-r--r--apps/user_status/src/store/userStatus.js19
2 files changed, 17 insertions, 6 deletions
diff --git a/apps/user_status/src/components/SetStatusModal.vue b/apps/user_status/src/components/SetStatusModal.vue
index df6858ca6ff..0c95128c8d2 100644
--- a/apps/user_status/src/components/SetStatusModal.vue
+++ b/apps/user_status/src/components/SetStatusModal.vue
@@ -55,14 +55,14 @@
<ClearAtSelect :clear-at="clearAt"
@select-clear-at="setClearAt" />
<div class="status-buttons">
- <ButtonVue wide="true"
+ <ButtonVue :wide="true"
type="tertiary"
:text="$t('user_status', 'Clear status message')"
:disabled="isSavingStatus"
@click="clearStatus">
{{ $t('user_status', 'Clear status message') }}
</ButtonVue>
- <ButtonVue wide="true"
+ <ButtonVue :wide="true"
type="primary"
:text="$t('user_status', 'Set status message')"
:disabled="isSavingStatus"
diff --git a/apps/user_status/src/store/userStatus.js b/apps/user_status/src/store/userStatus.js
index c54fbe5040b..6d8b5bd1e1f 100644
--- a/apps/user_status/src/store/userStatus.js
+++ b/apps/user_status/src/store/userStatus.js
@@ -130,12 +130,23 @@ const mutations = {
*/
loadStatusFromServer(state, { status, statusIsUserDefined, message, icon, clearAt, messageIsPredefined, messageId }) {
state.status = status
- state.statusIsUserDefined = statusIsUserDefined
state.message = message
state.icon = icon
- state.clearAt = clearAt
- state.messageIsPredefined = messageIsPredefined
- state.messageId = messageId
+
+ // Don't overwrite certain values if the refreshing comes in via short updates
+ // E.g. from talk participant list which only has the status, message and icon
+ if (typeof statusIsUserDefined !== 'undefined') {
+ state.statusIsUserDefined = statusIsUserDefined
+ }
+ if (typeof clearAt !== 'undefined') {
+ state.clearAt = clearAt
+ }
+ if (typeof messageIsPredefined !== 'undefined') {
+ state.messageIsPredefined = messageIsPredefined
+ }
+ if (typeof messageId !== 'undefined') {
+ state.messageId = messageId
+ }
},
}