display multiposting messages in thread fix #120
This commit is contained in:
parent
fe8b14f94e
commit
02caa33a8c
|
@ -238,9 +238,6 @@ export class CreateStatusComponent implements OnInit, OnDestroy {
|
||||||
return this.sendStatus(acc, this.status, visibility, this.title, status, mediaAttachments);
|
return this.sendStatus(acc, this.status, visibility, this.title, status, mediaAttachments);
|
||||||
})
|
})
|
||||||
.then((res: Status) => {
|
.then((res: Status) => {
|
||||||
if (this.statusReplyingToWrapper) {
|
|
||||||
this.notificationService.newStatusPosted(this.statusReplyingToWrapper.status.id, new StatusWrapper(res, acc));
|
|
||||||
}
|
|
||||||
this.title = '';
|
this.title = '';
|
||||||
this.status = '';
|
this.status = '';
|
||||||
this.onClose.emit();
|
this.onClose.emit();
|
||||||
|
@ -261,22 +258,30 @@ export class CreateStatusComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
for (let i = 0; i < parsedStatus.length; i++) {
|
for (let i = 0; i < parsedStatus.length; i++) {
|
||||||
let s = parsedStatus[i];
|
let s = parsedStatus[i];
|
||||||
resultPromise = resultPromise.then((pStatus: Status) => {
|
resultPromise = resultPromise
|
||||||
let inReplyToId = null;
|
.then((pStatus: Status) => {
|
||||||
if (pStatus) {
|
let inReplyToId = null;
|
||||||
inReplyToId = pStatus.id;
|
if (pStatus) {
|
||||||
}
|
inReplyToId = pStatus.id;
|
||||||
|
}
|
||||||
|
|
||||||
if (i === 0) {
|
if (i === 0) {
|
||||||
return this.mastodonService.postNewStatus(account, s, visibility, title, inReplyToId, attachments.map(x => x.id))
|
return this.mastodonService.postNewStatus(account, s, visibility, title, inReplyToId, attachments.map(x => x.id))
|
||||||
.then((status: Status) => {
|
.then((status: Status) => {
|
||||||
this.mediaService.clearMedia();
|
this.mediaService.clearMedia();
|
||||||
return status;
|
return status;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return this.mastodonService.postNewStatus(account, s, visibility, title, inReplyToId, []);
|
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;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return resultPromise;
|
return resultPromise;
|
||||||
|
|
Loading…
Reference in New Issue