mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-13 08:04:40 +08:00
Merge branch 'master' of ssh://github.com/nylas/k2
This commit is contained in:
commit
ec9f8581f7
2 changed files with 6 additions and 20 deletions
|
@ -92,25 +92,11 @@ module.exports = (sequelize, Sequelize) => {
|
|||
if (this.folder_id && !this.folder) {
|
||||
throw new Error("Message.toJSON called on a message where folder were not eagerly loaded.")
|
||||
}
|
||||
|
||||
return {
|
||||
id: this.id,
|
||||
account_id: this.accountId,
|
||||
object: 'message',
|
||||
body: this.body,
|
||||
subject: this.subject,
|
||||
snippet: this.snippet,
|
||||
to: this.to,
|
||||
from: this.from,
|
||||
cc: this.cc,
|
||||
bcc: this.bcc,
|
||||
reply_to: this.replyTo,
|
||||
date: this.date.getTime() / 1000.0,
|
||||
unread: this.unread,
|
||||
starred: this.starred,
|
||||
folder: this.folder,
|
||||
thread_id: this.threadId,
|
||||
};
|
||||
const json = Object.assign({object: 'message'}, this.dataValues)
|
||||
if (json.date) {
|
||||
json.date = json.date.getTime() / 1000.0
|
||||
}
|
||||
return json
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
@ -4,7 +4,7 @@ class MiniAccount extends React.Component {
|
|||
|
||||
calculateColor() {
|
||||
// in milliseconds
|
||||
const grayAfter = 10000;
|
||||
const grayAfter = 1000 * 60 * 10; // 10 minutes
|
||||
const elapsedTime = Date.now() - this.props.account.last_sync_completions[0];
|
||||
let opacity = 0;
|
||||
if (elapsedTime < grayAfter) {
|
||||
|
|
Loading…
Add table
Reference in a new issue