Browse Source

Merge pull request #43248 from nextcloud/fix/clear-status-after-predefined

fix(user_status): Fix status update request not being sent
tags/v29.0.0beta1
Pytal 3 months ago
parent
commit
f6dba9620f
No account linked to committer's email address

+ 5
- 11
apps/user_status/src/components/SetStatusModal.vue View File

return { return {
clearAt: null, clearAt: null,
editedMessage: '', editedMessage: '',
isCustomStatus: true,
isSavingStatus: false, isSavingStatus: false,
statuses: getAllStatusOptions(), statuses: getAllStatusOptions(),
} }
* @param {string} icon The new icon * @param {string} icon The new icon
*/ */
setIcon(icon) { setIcon(icon) {
this.isCustomStatus = true
this.$store.dispatch('setCustomMessage', { this.$store.dispatch('setCustomMessage', {
message: this.message, message: this.message,
icon, icon,
* @param {string} message The new message * @param {string} message The new message
*/ */
setMessage(message) { setMessage(message) {
this.isCustomStatus = true
this.editedMessage = message this.editedMessage = message
}, },
/** /**
* @param {object} status The predefined status object * @param {object} status The predefined status object
*/ */
selectPredefinedMessage(status) { selectPredefinedMessage(status) {
this.isCustomStatus = false
this.clearAt = status.clearAt this.clearAt = status.clearAt
this.$store.dispatch('setPredefinedMessage', { this.$store.dispatch('setPredefinedMessage', {
messageId: status.id, messageId: status.id,
try { try {
this.isSavingStatus = true this.isSavingStatus = true


if (this.isCustomStatus) {
await this.$store.dispatch('setCustomMessage', {
message: this.editedMessage,
icon: this.icon,
clearAt: this.clearAt,
})
}
await this.$store.dispatch('setCustomMessage', {
message: this.editedMessage,
icon: this.icon,
clearAt: this.clearAt,
})
} catch (err) { } catch (err) {
showError(this.$t('user_status', 'There was an error saving the status')) showError(this.$t('user_status', 'There was an error saving the status'))
console.debug(err) console.debug(err)

+ 2
- 2
dist/user-status-modal-5133.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/user-status-modal-5133.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/user_status-menu.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/user_status-menu.js.map
File diff suppressed because it is too large
View File


Loading…
Cancel
Save