Skip to content

Commit

Permalink
Fix the combined inbox not excluding content from folders removed by …
Browse files Browse the repository at this point in the history
…the user
  • Loading branch information
jacob-js committed Nov 6, 2024
1 parent 9cdbb8e commit 7033ab6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
9 changes: 2 additions & 7 deletions modules/imap/handler_modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -456,12 +456,7 @@ public function process() {
$this->session->record_unsaved('Added folder to combined pages');
}
else {
if (is_array($sources) && array_key_exists($form['list_path'], $sources)) {
unset($sources[$form['list_path']]);
}
else {
$sources[$form['list_path']] = 'remove';
}
$sources[$form['list_path']] = 'remove';
Hm_Msgs::add('Folder removed from combined pages');
$this->session->record_unsaved('Removed folder from combined pages');
}
Expand Down Expand Up @@ -1311,7 +1306,7 @@ public function process() {
}
$folders = array($folder);
} else {
$data_sources = imap_data_sources('');
$data_sources = imap_data_sources('', $this->session->get('custom_imap_sources', user:true));
$ids = array_map(function($ds) { return $ds['id']; }, $data_sources);
$folders = array_map(function($ds) { return $ds['folder']; }, $data_sources);
}
Expand Down
1 change: 1 addition & 0 deletions modules/imap/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ var display_imap_mailbox = function(rows, links, path = getListPathParam()) {
serverIds.push(detail.server_id);
}
if (rows) {
// TODO: Review the update() method, it seems not to be correctly removing the old data from the page
Hm_Message_List.update(serverIds, rows, 'imap');
Hm_Message_List.check_empty_list();
$('.page_links').html(links);
Expand Down

0 comments on commit 7033ab6

Please sign in to comment.