Skip to content

Commit 2409393

Browse files
authored
Merge pull request #1628 from mercihabam/fix-read-status
fix(frontend): the read/unread action does not update the message list state, nor does opening a message update its read state
2 parents c2e3640 + 585bf31 commit 2409393

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

modules/core/js_modules/Hm_MessagesStore.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ class Hm_MessagesStore {
8888
for (const id in updatedMessages) {
8989
if (this.rows.map(row => row['1']).indexOf(id) === -1) {
9090
this.rows.push(updatedMessages[id]);
91+
} else {
92+
const index = this.rows.map(row => row['1']).indexOf(id);
93+
this.rows[index] = updatedMessages[id];
9194
}
9295
}
9396

modules/imap/handler_modules.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,6 +1185,9 @@ private function perform_action($mailbox, $action_type, $uids, $folder, $special
11851185
if (!$mailbox->message_action($folder_name, mb_strtoupper($action_type), $uids)['status']) {
11861186
$error = true;
11871187
} else {
1188+
foreach ($uids as $uid) {
1189+
$moved[] = sprintf("imap_%s_%s_%s", $server_details['id'], $uid, $folder);
1190+
}
11881191
if ($action_type == 'delete') {
11891192
$mailbox->message_action($folder_name, 'EXPUNGE', $uids);
11901193
}

0 commit comments

Comments
 (0)