Fix posting order for threads
This commit is contained in:
parent
8f37465be0
commit
a7f982e827
|
@ -99,10 +99,13 @@ struct StatusEditorToolbarItems: ToolbarContent {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func postAllStatus() async {
|
private func postAllStatus() async {
|
||||||
guard let openingPost = await postStatus(with: mainSEVM, isMainPost: true) else { return }
|
guard var latestPost = await postStatus(with: mainSEVM, isMainPost: true) else { return }
|
||||||
for p in followUpSEVMs {
|
for p in followUpSEVMs {
|
||||||
p.mode = .replyTo(status: openingPost)
|
p.mode = .replyTo(status: latestPost)
|
||||||
await postStatus(with: p, isMainPost: false)
|
guard let post = await postStatus(with: p, isMainPost: false) else {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
latestPost = post
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue