mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-01 04:22:15 +08:00
Fix unread status for thread message with sub unread message.
This commit is contained in:
parent
46917754a4
commit
fa35368e45
4 changed files with 20 additions and 20 deletions
|
@ -264,25 +264,25 @@ WebMailCacheStorage.prototype.initMessageFlagsFromCache = function (oMessage)
|
|||
mFlaggedSubUid = null
|
||||
;
|
||||
|
||||
if (aFlags && 5 === aFlags.length)
|
||||
if (aFlags && 0 < aFlags.length)
|
||||
{
|
||||
oMessage.unseen(aFlags[0]);
|
||||
oMessage.flagged(aFlags[1]);
|
||||
oMessage.answered(aFlags[2]);
|
||||
oMessage.forwarded(aFlags[3]);
|
||||
oMessage.isReadReceipt(aFlags[4]);
|
||||
oMessage.unseen(!!aFlags[0]);
|
||||
oMessage.flagged(!!aFlags[1]);
|
||||
oMessage.answered(!!aFlags[2]);
|
||||
oMessage.forwarded(!!aFlags[3]);
|
||||
oMessage.isReadReceipt(!!aFlags[4]);
|
||||
}
|
||||
|
||||
if (0 < oMessage.threads().length)
|
||||
{
|
||||
mUnseenSubUid = _.find(oMessage.threads(), function (iSubUid) {
|
||||
var aFlags = self.getMessageFlagsFromCache(oMessage.folderFullNameRaw, iSubUid);
|
||||
return aFlags && 4 === aFlags.length && !!aFlags[0];
|
||||
return aFlags && 0 < aFlags.length && !!aFlags[0];
|
||||
});
|
||||
|
||||
mFlaggedSubUid = _.find(oMessage.threads(), function (iSubUid) {
|
||||
var aFlags = self.getMessageFlagsFromCache(oMessage.folderFullNameRaw, iSubUid);
|
||||
return aFlags && 4 === aFlags.length && !!aFlags[1];
|
||||
return aFlags && 0 < aFlags.length && !!aFlags[1];
|
||||
});
|
||||
|
||||
oMessage.hasUnseenSubMessage(mUnseenSubUid && 0 < Utils.pInt(mUnseenSubUid));
|
||||
|
@ -312,7 +312,7 @@ WebMailCacheStorage.prototype.storeMessageFlagsToCache = function (oMessage)
|
|||
*/
|
||||
WebMailCacheStorage.prototype.storeMessageFlagsToCacheByFolderAndUid = function (sFolder, sUid, aFlags)
|
||||
{
|
||||
if (Utils.isArray(aFlags) && 4 === aFlags.length)
|
||||
if (Utils.isArray(aFlags) && 0 < aFlags.length)
|
||||
{
|
||||
this.setMessageFlagsToCache(sFolder, sUid, aFlags);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "RainLoop",
|
||||
"title": "RainLoop Webmail",
|
||||
"version": "1.6.1",
|
||||
"release": "642",
|
||||
"release": "645",
|
||||
"description": "Simple, modern & fast web-based email client",
|
||||
"homepage": "http://rainloop.net",
|
||||
"main": "Gruntfile.js",
|
||||
|
|
|
@ -15714,25 +15714,25 @@ WebMailCacheStorage.prototype.initMessageFlagsFromCache = function (oMessage)
|
|||
mFlaggedSubUid = null
|
||||
;
|
||||
|
||||
if (aFlags && 5 === aFlags.length)
|
||||
if (aFlags && 0 < aFlags.length)
|
||||
{
|
||||
oMessage.unseen(aFlags[0]);
|
||||
oMessage.flagged(aFlags[1]);
|
||||
oMessage.answered(aFlags[2]);
|
||||
oMessage.forwarded(aFlags[3]);
|
||||
oMessage.isReadReceipt(aFlags[4]);
|
||||
oMessage.unseen(!!aFlags[0]);
|
||||
oMessage.flagged(!!aFlags[1]);
|
||||
oMessage.answered(!!aFlags[2]);
|
||||
oMessage.forwarded(!!aFlags[3]);
|
||||
oMessage.isReadReceipt(!!aFlags[4]);
|
||||
}
|
||||
|
||||
if (0 < oMessage.threads().length)
|
||||
{
|
||||
mUnseenSubUid = _.find(oMessage.threads(), function (iSubUid) {
|
||||
var aFlags = self.getMessageFlagsFromCache(oMessage.folderFullNameRaw, iSubUid);
|
||||
return aFlags && 4 === aFlags.length && !!aFlags[0];
|
||||
return aFlags && 0 < aFlags.length && !!aFlags[0];
|
||||
});
|
||||
|
||||
mFlaggedSubUid = _.find(oMessage.threads(), function (iSubUid) {
|
||||
var aFlags = self.getMessageFlagsFromCache(oMessage.folderFullNameRaw, iSubUid);
|
||||
return aFlags && 4 === aFlags.length && !!aFlags[1];
|
||||
return aFlags && 0 < aFlags.length && !!aFlags[1];
|
||||
});
|
||||
|
||||
oMessage.hasUnseenSubMessage(mUnseenSubUid && 0 < Utils.pInt(mUnseenSubUid));
|
||||
|
@ -15762,7 +15762,7 @@ WebMailCacheStorage.prototype.storeMessageFlagsToCache = function (oMessage)
|
|||
*/
|
||||
WebMailCacheStorage.prototype.storeMessageFlagsToCacheByFolderAndUid = function (sFolder, sUid, aFlags)
|
||||
{
|
||||
if (Utils.isArray(aFlags) && 4 === aFlags.length)
|
||||
if (Utils.isArray(aFlags) && 0 < aFlags.length)
|
||||
{
|
||||
this.setMessageFlagsToCache(sFolder, sUid, aFlags);
|
||||
}
|
||||
|
|
2
rainloop/v/0.0.0/static/js/app.min.js
vendored
2
rainloop/v/0.0.0/static/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue