Fix: Empty mailbox
This commit is contained in:
@ -222,11 +222,11 @@
|
|||||||
messages: () => {
|
messages: () => {
|
||||||
const uri = '/mailbox/{{$mailbox_id}}/messages/valid'
|
const uri = '/mailbox/{{$mailbox_id}}/messages/valid'
|
||||||
return Send.get(uri).then((response, status, jqXHR) => {
|
return Send.get(uri).then((response, status, jqXHR) => {
|
||||||
if (parseInt(jqXHR.status/100) !== 2) {
|
if (parseInt(jqXHR.status/100) !== 2 || jqXHR.status === 204) {
|
||||||
return
|
$(this.id.results).html('').append(
|
||||||
}
|
|
||||||
if (jqXHR.status === 204) {
|
|
||||||
this.draw().empty()
|
this.draw().empty()
|
||||||
|
)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
if (this.total === null) {
|
if (this.total === null) {
|
||||||
$(this.id.count).html(' (' + response.total + ')')
|
$(this.id.count).html(' (' + response.total + ')')
|
||||||
@ -390,6 +390,7 @@
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
empty: () => {
|
empty: () => {
|
||||||
|
$(this.id.count).html(' (0)')
|
||||||
return $('<div></div>').addClass('ui message').html('No messages found.')
|
return $('<div></div>').addClass('ui message').html('No messages found.')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user