1
0
mirror of https://github.com/axllent/mailpit.git synced 2024-12-30 23:17:59 +02:00

UI: Update pagination values when new mail arrives when not on first page

This commit is contained in:
Ralph Slooten 2022-08-07 08:38:52 +12:00
parent d9f1f88107
commit f260495495

View File

@ -210,12 +210,14 @@ export default {
}
// new messages
if (response.Type == "new" && response.Data) {
if (self.start < 1) {
if (!self.searching) {
if (!self.searching) {
if (self.start < 1) {
self.items.unshift(response.Data);
if (self.items.length > self.limit) {
self.items.pop();
}
} else {
self.start++;
}
}
self.total++;