diff --git a/ui/resources/views/emails/messages.blade.php b/ui/resources/views/emails/messages.blade.php index 209f53e..47101f3 100644 --- a/ui/resources/views/emails/messages.blade.php +++ b/ui/resources/views/emails/messages.blade.php @@ -222,12 +222,12 @@ messages: () => { const uri = '/mailbox/{{$mailbox_id}}/messages/valid' return Send.get(uri).then((response, status, jqXHR) => { - if (parseInt(jqXHR.status/100) !== 2) { + if (parseInt(jqXHR.status/100) !== 2 || jqXHR.status === 204) { + $(this.id.results).html('').append( + this.draw().empty() + ) return } - if (jqXHR.status === 204) { - this.draw().empty() - } if (this.total === null) { $(this.id.count).html(' (' + response.total + ')') this.total = response.total @@ -390,6 +390,7 @@ ) }, empty: () => { + $(this.id.count).html(' (0)') return $('
').addClass('ui message').html('No messages found.') } }