Skip to content

Commit

Permalink
compose: #42 Return to table after sending
Browse files Browse the repository at this point in the history
  • Loading branch information
petersalomonsen committed Jan 28, 2019
1 parent 3a73701 commit e458b6a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app/compose/compose.component.ts
Expand Up @@ -459,9 +459,9 @@ export class ComposeComponent implements AfterViewInit, OnDestroy, OnInit {
.subscribe((res) => {
this.model.mid = parseInt(res[2], 10);
this.snackBar.open(res[1], null, { duration: 3000 });
if (send) {
this.draftDeleted.emit(this.model.mid);
}

this.draftDeleted.emit(this.model.mid);
this.exitToTable();
}, (err) => {
let msg = err.statusText;
if (err.field_errors) {
Expand All @@ -470,7 +470,7 @@ export class ComposeComponent implements AfterViewInit, OnDestroy, OnInit {
`field ${fieldname}: ${err.field_errors[fieldname][0]}`);
}
this.snackBar.open(
`Error saving draft: ${msg}`,
`Error sending: ${msg}`,
'Dismiss'
);
});
Expand Down

0 comments on commit e458b6a

Please sign in to comment.