1
0
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:
Tankred Hase 2013-10-11 23:27:55 +02:00
parent 7b844aa218
commit d99c7acb50
2 changed files with 10 additions and 3 deletions

View File

@ -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

View File

@ -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();
});
//