Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(user_status): Fix status update request not being sent
Signed-off-by: Christopher Ng <[email protected]>

[skip ci]
  • Loading branch information
Pytal authored and backportbot[bot] committed Feb 24, 2024
commit 9d4143b1bd304858c524d8165fc0adcdd8f9e611
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