Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-05-27 10:26:53 +0300
committerJoas Schilling <coding@schilljs.com>2022-05-27 10:30:16 +0300
commit52737c029c18d7bd504fbeb031f90ac446684cb1 (patch)
treeedb545ef0f8aeb8deda3f7ce14061d3c46f536c2 /apps
parent5f2e7e971046ac6c7218b7655a5ebbce7d9a38a3 (diff)
Don't overwrite certain values if the refreshing comes in via short updates
This e.g. happens from the talk participant list which only has the status, message and icon. Due to the overwriting e.g. the clearAt was overwritten with null and afterwards the status modal showed "Invalid date" as "Clear at" Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps')
-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
+ }
},
}