Skip to content

Commit

Permalink
fix(user_status): Fix status update request not being sent
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <chrng8@gmail.com>

[skip ci]
  • Loading branch information
Pytal authored and backportbot[bot] committed Feb 24, 2024
1 parent d787449 commit 9d4143b
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions apps/user_status/src/components/SetStatusModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ export default {
return {
clearAt: null,
editedMessage: '',
isCustomStatus: true,
isSavingStatus: false,
statuses: getAllStatusOptions(),
}
Expand Down Expand Up @@ -213,7 +212,6 @@ export default {
* @param {string} icon The new icon
*/
setIcon(icon) {
this.isCustomStatus = true
this.$store.dispatch('setCustomMessage', {
message: this.message,
icon,
Expand All @@ -229,7 +227,6 @@ export default {
* @param {string} message The new message
*/
setMessage(message) {
this.isCustomStatus = true
this.editedMessage = message
},
/**
Expand All @@ -246,7 +243,6 @@ export default {
* @param {object} status The predefined status object
*/
selectPredefinedMessage(status) {
this.isCustomStatus = false
this.clearAt = status.clearAt
this.$store.dispatch('setPredefinedMessage', {
messageId: status.id,
Expand All @@ -266,13 +262,11 @@ export default {
try {
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) {
showError(this.$t('user_status', 'There was an error saving the status'))
console.debug(err)
Expand Down

0 comments on commit 9d4143b

Please sign in to comment.