Skip to content

Commit

Permalink
fix: fix renaming mailbox hierarchy
Browse files Browse the repository at this point in the history
Signed-off-by: greta <gretadoci@gmail.com>
  • Loading branch information
GretaD authored and backportbot[bot] committed Aug 28, 2024
1 parent 278d95f commit 11d582b
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/components/NavigationMailbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -610,23 +610,25 @@ export default {
},
async renameMailbox() {
this.renameInput = false
this.showSaving = false
this.showSaving = true
try {
let newName = this.mailboxName
if (this.mailbox.path) {
newName = this.mailbox.path + this.mailbox.delimiter + newName
}
await this.$store.dispatch('renameMailbox', {
account: this.account,
mailbox: this.mailbox,
newName: this.mailboxName,
newName,
})
this.renameLabel = true
this.renameInput = false
this.showSaving = false
} catch (error) {
showInfo(t('mail', 'An error occurred, unable to rename the mailbox.'))
console.error(error)
this.renameLabel = false
this.renameInput = false
this.showSaving = true
} finally {
this.showSaving = false
}
},
openRenameInput() {
Expand Down

0 comments on commit 11d582b

Please sign in to comment.