1
0
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:
Tankred Hase 2014-02-25 21:05:59 +01:00
parent 86c0f04973
commit b59ca4a773

View File

@ -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) {