Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
fix(Felamimail/SPAM):wrong ham strategy ui behavior
Browse files Browse the repository at this point in the history
- noJunk keep selection after grid reload
- fix ham strategy ui with multi selections
- add response for Felamimail.processSpam method
Change-Id: Ic8b6aca42ef30f65d958d7bdba40f9c0ef2a625b
  • Loading branch information
ccheng-dev committed Aug 23, 2021
1 parent c37e301 commit c8f983d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
4 changes: 4 additions & 0 deletions tine20/Felamimail/Frontend/Json.php
Original file line number Diff line number Diff line change
Expand Up @@ -825,5 +825,9 @@ public function processSpam($messageId, $userRating)
$message = Felamimail_Controller_Message::getInstance()->getCompleteMessage($messageId);
$pipeLine = new Tinebase_BL_Pipe($rs, false);
$pipeLine->execute($message);

return [
'status' => 'success'
];
}
}
19 changes: 14 additions & 5 deletions tine20/Felamimail/js/GridPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -1795,16 +1795,25 @@ Tine.Felamimail.GridPanel = Ext.extend(Tine.widgets.grid.GridPanel, {
targetFolder.set('cache_status', 'pending');
targetFolder.commit();
}

if (nextRecord) {
sm.selectRecords([nextRecord]);
}
}

if ('spam' === option && nextRecord) {
sm.selectRecords([nextRecord]);
if ('ham' === option ) {
sm.selectRecords(msgs.items, true);
}

await Promise.allSettled(promises);
await Promise.allSettled(promises)
.then(() => {
if ('spam' === option) {
this.onAfterDelete(msgsIds);
}

this.doRefresh();
});

this.onAfterDelete(msgsIds);
this.doRefresh();
} catch (e) {
this.doRefresh();
}
Expand Down

0 comments on commit c8f983d

Please sign in to comment.