mirror of
https://github.com/moparisthebest/mail
synced 2024-11-23 01:12:19 -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
|
||||
};
|
||||
|
||||
// close the writer
|
||||
$scope.state.writer.close();
|
||||
|
||||
// persist the email to disk for later sending
|
||||
outbox.put(email, function(err) {
|
||||
if (err) {
|
||||
@ -237,15 +240,11 @@ define(function(require) {
|
||||
// mark replyTo as answered, if necessary
|
||||
if ($scope.replyTo && !$scope.replyTo.answered) {
|
||||
$scope.replyTo.answered = true;
|
||||
// update the ui
|
||||
$scope.$apply();
|
||||
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.
|
||||
// otherwise, we're done
|
||||
if (!needsSync) {
|
||||
|
Loading…
Reference in New Issue
Block a user