mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-11-10 17:13:38 +08:00
Idea for #737
This commit is contained in:
parent
a88dc82224
commit
7af66185c4
1 changed files with 12 additions and 0 deletions
|
@ -97,6 +97,18 @@ addComputablesTo(MessagelistUserStore, {
|
|||
)
|
||||
},
|
||||
|
||||
listByDay: () => {
|
||||
let list = {};
|
||||
MessagelistUserStore.forEach(msg => {
|
||||
let day = (new Date(msg.dateTimeStampInUTC() * 1000)).format('Ymd');
|
||||
if (!list[day]) {
|
||||
list[day] = {day:day,messages:[]};
|
||||
}
|
||||
list[day].messages.push(msg);
|
||||
});
|
||||
return Object.values(list);
|
||||
},
|
||||
|
||||
listCheckedOrSelected: () => {
|
||||
const
|
||||
selectedMessage = MessagelistUserStore.selectedMessage(),
|
||||
|
|
Loading…
Reference in a new issue