Skip to content

Commit d8c903a

Browse files
authored
Merge pull request #1753 from mercihabam/fix-message-apend
fix(frontend): last new row isn't appended to the bottom of the message list
2 parents d533a0e + 72a0da0 commit d8c903a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/imap/site.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ async function select_imap_folder(path, page = 1, reload, processInTheBackground
413413
const tableRow = Hm_Utils.tbody().find(`tr[data-uid="${rowUid}"]`);
414414
if (!tableRow.length) {
415415
const index = messages.rows.map(r => $(r['0']).data('uid')).indexOf(rowUid);
416-
if (Hm_Utils.rows().length >= index) {
416+
if ((Hm_Utils.rows().length - 1) >= index) {
417417
Hm_Utils.rows().eq(index).before(row);
418418
} else {
419419
Hm_Utils.tbody().append(row);

0 commit comments

Comments
 (0)