mirror of
https://github.com/moparisthebest/mail
synced 2024-11-23 09:22:23 -05:00
close writer before putting to outbox
This commit is contained in:
parent
86c0f04973
commit
b59ca4a773
@ -223,6 +223,9 @@ define(function(require) {
|
|||||||
attachments: $scope.attachments
|
attachments: $scope.attachments
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// close the writer
|
||||||
|
$scope.state.writer.close();
|
||||||
|
|
||||||
// persist the email to disk for later sending
|
// persist the email to disk for later sending
|
||||||
outbox.put(email, function(err) {
|
outbox.put(email, function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
@ -237,15 +240,11 @@ define(function(require) {
|
|||||||
// mark replyTo as answered, if necessary
|
// mark replyTo as answered, if necessary
|
||||||
if ($scope.replyTo && !$scope.replyTo.answered) {
|
if ($scope.replyTo && !$scope.replyTo.answered) {
|
||||||
$scope.replyTo.answered = true;
|
$scope.replyTo.answered = true;
|
||||||
|
// update the ui
|
||||||
|
$scope.$apply();
|
||||||
needsSync = true;
|
needsSync = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// close the writer
|
|
||||||
$scope.state.writer.close();
|
|
||||||
|
|
||||||
// update the ui the scope
|
|
||||||
$scope.$apply();
|
|
||||||
|
|
||||||
// if we need to synchronize replyTo.answered, let's do that.
|
// if we need to synchronize replyTo.answered, let's do that.
|
||||||
// otherwise, we're done
|
// otherwise, we're done
|
||||||
if (!needsSync) {
|
if (!needsSync) {
|
||||||
|
Loading…
Reference in New Issue
Block a user