mirror of
https://github.com/moparisthebest/mail
synced 2025-01-11 05:28:00 -05:00
fix ui init and only mark email as read if manually selected
This commit is contained in:
parent
7b844aa218
commit
d99c7acb50
@ -7,7 +7,8 @@ define(function(require) {
|
||||
|
||||
var MailListCtrl = function($scope) {
|
||||
var offset = 0,
|
||||
num = 100;
|
||||
num = 100,
|
||||
firstSelect = true;
|
||||
|
||||
emailDao = appController._emailDao;
|
||||
|
||||
@ -72,6 +73,7 @@ define(function(require) {
|
||||
//
|
||||
|
||||
function initList() {
|
||||
firstSelect = true;
|
||||
updateStatus('Read cache ...');
|
||||
|
||||
// list messaged from local db
|
||||
@ -157,8 +159,13 @@ define(function(require) {
|
||||
}
|
||||
|
||||
function markAsRead(email) {
|
||||
email.unread = false;
|
||||
// don't mark top selected email automatically
|
||||
if (firstSelect) {
|
||||
firstSelect = false;
|
||||
return;
|
||||
}
|
||||
|
||||
email.unread = false;
|
||||
emailDao.imapMarkMessageRead({
|
||||
folder: getFolder().path,
|
||||
uid: email.uid
|
||||
|
@ -11,9 +11,9 @@ define(function(require) {
|
||||
|
||||
initFolders(function(folders) {
|
||||
$scope.folders = folders;
|
||||
$scope.$apply();
|
||||
// select inbox as the current folder on init
|
||||
$scope.openFolder($scope.folders[0]);
|
||||
$scope.$apply();
|
||||
});
|
||||
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user