mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-16 02:38:51 +00:00
feat(mail): filter mailbox by unread messages
Fixes #1146 Fixes #3156 Fixes #4752
This commit is contained in:
@@ -342,6 +342,17 @@
|
||||
return angular.isDefined(this.$selectedMessage);
|
||||
};
|
||||
|
||||
/**
|
||||
* @function toggleUnseenOnly
|
||||
* @memberof Mailbox.prototype
|
||||
* @desc Toggle filter by unseen messages only. Requires a round trip to the server.
|
||||
*/
|
||||
Mailbox.prototype.toggleUnseenOnly = function() {
|
||||
var _this = this;
|
||||
this.$unseenOnly = !this.$unseenOnly;
|
||||
this.$filter(Mailbox.$query);
|
||||
};
|
||||
|
||||
/**
|
||||
* @function $filter
|
||||
* @memberof Mailbox.prototype
|
||||
@@ -394,6 +405,9 @@
|
||||
options.syncToken = this.$syncToken;
|
||||
}
|
||||
|
||||
if (this.$unseenOnly)
|
||||
options.unseenOnly = 1;
|
||||
|
||||
// Restart the refresh timer, if needed
|
||||
if (!Mailbox.$virtualMode) {
|
||||
var refreshViewCheck = Mailbox.$Preferences.defaults.SOGoRefreshViewCheck;
|
||||
|
||||
Reference in New Issue
Block a user