mirror of
https://github.com/moparisthebest/mail
synced 2025-02-20 04:41:52 -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) {
|
$scope.getContent = function(email) {
|
||||||
|
// don't stream message content of outbox messages...
|
||||||
|
if (getFolder().type === 'Outbox') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
emailDao.getMessageContent({
|
emailDao.getMessageContent({
|
||||||
folder: getFolder().path,
|
folder: getFolder().path,
|
||||||
message: email
|
message: email
|
||||||
@ -72,17 +77,21 @@ define(function(require) {
|
|||||||
* Called when clicking on an email list item
|
* Called when clicking on an email list item
|
||||||
*/
|
*/
|
||||||
$scope.select = function(email) {
|
$scope.select = function(email) {
|
||||||
|
// unselect an item
|
||||||
if (!email) {
|
if (!email) {
|
||||||
$scope.state.mailList.selected = undefined;
|
$scope.state.mailList.selected = undefined;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if we're in the outbox, don't decrypt as usual
|
||||||
|
if (getFolder().type !== 'Outbox') {
|
||||||
emailDao.decryptMessageContent({
|
emailDao.decryptMessageContent({
|
||||||
message: email
|
message: email
|
||||||
}, function(error) {
|
}, function(error) {
|
||||||
$scope.$apply();
|
$scope.$apply();
|
||||||
$scope.onError(error);
|
$scope.onError(error);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
$scope.state.mailList.selected = email;
|
$scope.state.mailList.selected = email;
|
||||||
$scope.state.read.toggle(true);
|
$scope.state.read.toggle(true);
|
||||||
|
@ -249,7 +249,7 @@ define(function(require) {
|
|||||||
scope.state = {
|
scope.state = {
|
||||||
nav: {
|
nav: {
|
||||||
currentFolder: {
|
currentFolder: {
|
||||||
type: 'asd',
|
type: 'asd'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mailList: {},
|
mailList: {},
|
||||||
@ -278,6 +278,11 @@ define(function(require) {
|
|||||||
mailList: {},
|
mailList: {},
|
||||||
read: {
|
read: {
|
||||||
toggle: function() {}
|
toggle: function() {}
|
||||||
|
},
|
||||||
|
nav: {
|
||||||
|
currentFolder: {
|
||||||
|
type: 'asd'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user