mirror of
https://github.com/moparisthebest/mail
synced 2024-11-25 18:32:20 -05:00
exclude outbox from normal workflow
This commit is contained in:
parent
700ecca0a3
commit
8973c3e2b3
@ -59,6 +59,11 @@ define(function(require) {
|
||||
//
|
||||
|
||||
$scope.getContent = function(email) {
|
||||
// don't stream message content of outbox messages...
|
||||
if (getFolder().type === 'Outbox') {
|
||||
return;
|
||||
}
|
||||
|
||||
emailDao.getMessageContent({
|
||||
folder: getFolder().path,
|
||||
message: email
|
||||
@ -72,17 +77,21 @@ define(function(require) {
|
||||
* Called when clicking on an email list item
|
||||
*/
|
||||
$scope.select = function(email) {
|
||||
// unselect an item
|
||||
if (!email) {
|
||||
$scope.state.mailList.selected = undefined;
|
||||
return;
|
||||
}
|
||||
|
||||
emailDao.decryptMessageContent({
|
||||
message: email
|
||||
}, function(error) {
|
||||
$scope.$apply();
|
||||
$scope.onError(error);
|
||||
});
|
||||
// if we're in the outbox, don't decrypt as usual
|
||||
if (getFolder().type !== 'Outbox') {
|
||||
emailDao.decryptMessageContent({
|
||||
message: email
|
||||
}, function(error) {
|
||||
$scope.$apply();
|
||||
$scope.onError(error);
|
||||
});
|
||||
}
|
||||
|
||||
$scope.state.mailList.selected = email;
|
||||
$scope.state.read.toggle(true);
|
||||
|
@ -249,7 +249,7 @@ define(function(require) {
|
||||
scope.state = {
|
||||
nav: {
|
||||
currentFolder: {
|
||||
type: 'asd',
|
||||
type: 'asd'
|
||||
}
|
||||
},
|
||||
mailList: {},
|
||||
@ -278,6 +278,11 @@ define(function(require) {
|
||||
mailList: {},
|
||||
read: {
|
||||
toggle: function() {}
|
||||
},
|
||||
nav: {
|
||||
currentFolder: {
|
||||
type: 'asd'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user