display multiposting messages in thread fix #120

This commit is contained in:
Nicolas Constant 2019-06-15 21:22:03 -04:00
parent fe8b14f94e
commit 02caa33a8c
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
1 changed files with 24 additions and 19 deletions

View File

@ -238,9 +238,6 @@ export class CreateStatusComponent implements OnInit, OnDestroy {
return this.sendStatus(acc, this.status, visibility, this.title, status, mediaAttachments);
})
.then((res: Status) => {
if (this.statusReplyingToWrapper) {
this.notificationService.newStatusPosted(this.statusReplyingToWrapper.status.id, new StatusWrapper(res, acc));
}
this.title = '';
this.status = '';
this.onClose.emit();
@ -261,7 +258,8 @@ export class CreateStatusComponent implements OnInit, OnDestroy {
for (let i = 0; i < parsedStatus.length; i++) {
let s = parsedStatus[i];
resultPromise = resultPromise.then((pStatus: Status) => {
resultPromise = resultPromise
.then((pStatus: Status) => {
let inReplyToId = null;
if (pStatus) {
inReplyToId = pStatus.id;
@ -276,6 +274,13 @@ export class CreateStatusComponent implements OnInit, OnDestroy {
} else {
return this.mastodonService.postNewStatus(account, s, visibility, title, inReplyToId, []);
}
})
.then((status: Status) => {
if (this.statusReplyingToWrapper) {
this.notificationService.newStatusPosted(this.statusReplyingToWrapper.status.id, new StatusWrapper(status, account));
}
return status;
});
}