mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-27 09:36:09 +08:00
Draft code: on message view set hash
This commit is contained in:
parent
9e124f0572
commit
9d876d1146
1 changed files with 21 additions and 4 deletions
|
@ -68,7 +68,24 @@ const
|
|||
),
|
||||
|
||||
pad2 = v => 10 > v ? '0' + v : '' + v,
|
||||
Ymd = dt => dt.getFullYear() + pad2(1 + dt.getMonth()) + pad2(dt.getDate());
|
||||
Ymd = dt => dt.getFullYear() + pad2(1 + dt.getMonth()) + pad2(dt.getDate()),
|
||||
|
||||
setMessage = msg => {
|
||||
populateMessageBody(msg);
|
||||
/* This will replace url hash, and then load message
|
||||
* It's working properly yet
|
||||
// let hash = msg.href;
|
||||
let hash = mailBox(
|
||||
msg.folder,
|
||||
MessagelistUserStore.page(),
|
||||
MessagelistUserStore.listSearch(),
|
||||
MessagelistUserStore.threadUid(),
|
||||
msg.uid
|
||||
);
|
||||
MessageUserStore.message() ? hasher.replaceHash(hash) : hasher.setHash(hash);
|
||||
*/
|
||||
};
|
||||
|
||||
|
||||
let
|
||||
sLastSearchValue = '';
|
||||
|
@ -223,8 +240,8 @@ export class MailMessageList extends AbstractViewRight {
|
|||
|
||||
this.selector.on('ItemSelect', message => {
|
||||
if (message) {
|
||||
// populateMessageBody(message.clone());
|
||||
populateMessageBody(message);
|
||||
// setMessage(message.clone());
|
||||
setMessage(message);
|
||||
} else {
|
||||
MessageUserStore.message(null);
|
||||
}
|
||||
|
@ -299,7 +316,7 @@ export class MailMessageList extends AbstractViewRight {
|
|||
let message = new MessageModel;
|
||||
message.folder = sFolder;
|
||||
message.uid = iUid;
|
||||
populateMessageBody(message);
|
||||
setMessage(message);
|
||||
} else {
|
||||
MessageUserStore.message(null);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue