Skip to content

Commit

Permalink
Enabling core-mail-summary.js
Browse files Browse the repository at this point in the history
  • Loading branch information
marigostra committed Dec 28, 2022
1 parent 77e91fd commit 863425c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
17 changes: 8 additions & 9 deletions js/core-mail-incoming.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,15 @@
General Public License for more details.
*/

function saveToDefaultIncoming(mail, message)
{
var defaultIncoming = mail.folders.findFirstByProperty("defaultIncoming", 'true')
if (defaultIncoming == null)
return false;
return defaultIncoming.saveMessage(message);
}

Luwrain.addHook("luwrain.pim.mail.save.new", function(mail, message){
return true;
const defaultIncoming = mail.getFolders().findByProp("defaultIncoming", "true")
if (!defaultIncoming) {
Luwrain.log.error("mail", "no default incoming folder");
return false;
}
if (defaultIncoming.saveMessage(message))
Luwrain.log.debug("mail", "message saved");
return false;
var listId = message.list.id;
// if (listId.isEmpty())
return saveToDefaultIncoming(mail, message);
Expand Down
1 change: 1 addition & 0 deletions js/disabled-mail.js → js/core-mail-summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function divideOnGroups(items)
}

Luwrain.addHook("luwrain.mail.summary.organize", function(messages){
return messages;
var res = [];
for(var i = 0;i < messages.length;i++)
res.push({
Expand Down

0 comments on commit 863425c

Please sign in to comment.