aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_status
diff options
context:
space:
mode:
authorMaksim Sukharev <antreesy.web@gmail.com>2023-04-18 15:06:29 +0200
committerMaksim Sukharev <antreesy.web@gmail.com>2023-04-18 15:06:29 +0200
commit7455df35e3dc1e44546f465eb177a924777ae4aa (patch)
tree3d0f2275dea4982bfe14d873244069b0be258f2f /apps/user_status
parente2b377f85c54b1cc1a776590f35704d4b42e00a9 (diff)
downloadnextcloud-server-7455df35e3dc1e44546f465eb177a924777ae4aa.tar.gz
nextcloud-server-7455df35e3dc1e44546f465eb177a924777ae4aa.zip
fix(status): Store locally status message when editing
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Diffstat (limited to 'apps/user_status')
-rw-r--r--apps/user_status/src/components/SetStatusModal.vue20
1 files changed, 13 insertions, 7 deletions
diff --git a/apps/user_status/src/components/SetStatusModal.vue b/apps/user_status/src/components/SetStatusModal.vue
index 0ee8b3a1e18..73e07573e5c 100644
--- a/apps/user_status/src/components/SetStatusModal.vue
+++ b/apps/user_status/src/components/SetStatusModal.vue
@@ -43,7 +43,7 @@
<div class="set-status-modal__custom-input">
<CustomMessageInput ref="customMessageInput"
:icon="icon"
- :message="message"
+ :message="editedMessage"
@change="setMessage"
@submit="saveStatus"
@select-icon="setIcon" />
@@ -108,6 +108,7 @@ export default {
data() {
return {
clearAt: null,
+ editedMessage: '',
isSavingStatus: false,
statuses: getAllStatusOptions(),
}
@@ -153,6 +154,15 @@ export default {
},
},
+ watch: {
+ message: {
+ immediate: true,
+ handler(newValue) {
+ this.editedMessage = newValue
+ },
+ },
+ },
+
/**
* Loads the current status when a user opens dialog
*/
@@ -194,11 +204,7 @@ export default {
* @param {string} message The new message
*/
setMessage(message) {
- this.$store.dispatch('setCustomMessage', {
- message,
- icon: this.icon,
- clearAt: this.clearAt,
- })
+ this.editedMessage = message
},
/**
* Sets a new clearAt value
@@ -240,7 +246,7 @@ export default {
})
} else {
await this.$store.dispatch('setCustomMessage', {
- message: this.message,
+ message: this.editedMessage,
icon: this.icon,
clearAt: this.clearAt,
})