mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
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>
This commit is contained in:
parent
5f2e7e9710
commit
52737c029c
6 changed files with 23 additions and 12 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
4
dist/user-status-modal-8299.js
vendored
4
dist/user-status-modal-8299.js
vendored
File diff suppressed because one or more lines are too long
2
dist/user-status-modal-8299.js.map
vendored
2
dist/user-status-modal-8299.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/user_status-menu.js
vendored
4
dist/user_status-menu.js
vendored
File diff suppressed because one or more lines are too long
2
dist/user_status-menu.js.map
vendored
2
dist/user_status-menu.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue