mirror of
https://github.com/moparisthebest/mail
synced 2024-11-26 10:52:17 -05:00
Review url/history
This commit is contained in:
parent
43eb385a14
commit
dcfcd74373
@ -172,6 +172,10 @@ var MailListCtrl = function($scope, $timeout, $location, $filter, status, notifi
|
|||||||
|
|
||||||
// sort message by uid
|
// sort message by uid
|
||||||
messages.sort(byUidDescending);
|
messages.sort(byUidDescending);
|
||||||
|
// Unselect message if it has been deleted from the messages array
|
||||||
|
if (messages.indexOf(currentMessage()) === -1) {
|
||||||
|
$scope.select();
|
||||||
|
}
|
||||||
// set display buffer to first messages
|
// set display buffer to first messages
|
||||||
$scope.displayMessages = messages.slice(0, INIT_DISPLAY_LEN);
|
$scope.displayMessages = messages.slice(0, INIT_DISPLAY_LEN);
|
||||||
});
|
});
|
||||||
@ -285,7 +289,7 @@ var MailListCtrl = function($scope, $timeout, $location, $filter, status, notifi
|
|||||||
// Notification API
|
// Notification API
|
||||||
//
|
//
|
||||||
|
|
||||||
(email || {}).onIncomingMessage = function(msgs) {
|
email.onIncomingMessage = function(msgs) {
|
||||||
var note, title, message, unreadMsgs;
|
var note, title, message, unreadMsgs;
|
||||||
|
|
||||||
unreadMsgs = msgs.filter(function(msg) {
|
unreadMsgs = msgs.filter(function(msg) {
|
||||||
|
20
test/main.js
20
test/main.js
@ -26,26 +26,6 @@ if (!Function.prototype.bind) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// a warm round of applause for phantomjs for missing events
|
|
||||||
(function() {
|
|
||||||
if (!window.CustomEvent) {
|
|
||||||
var CustomEvent = function(event, params) {
|
|
||||||
params = params || {
|
|
||||||
bubbles: false,
|
|
||||||
cancelable: false,
|
|
||||||
detail: undefined
|
|
||||||
};
|
|
||||||
var evt = document.createEvent('CustomEvent');
|
|
||||||
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
|
|
||||||
return evt;
|
|
||||||
};
|
|
||||||
|
|
||||||
CustomEvent.prototype = window.Event.prototype;
|
|
||||||
|
|
||||||
window.CustomEvent = CustomEvent;
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Test setup
|
// Test setup
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user