mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-23 14:28:15 +00:00
Fix threading UI
This commit is contained in:
parent
052586022d
commit
aa63dd5ab7
1 changed files with 9 additions and 2 deletions
|
@ -99,9 +99,16 @@ public struct StatusDetailView: View {
|
||||||
var isReplyToPrevious: Bool = false
|
var isReplyToPrevious: Bool = false
|
||||||
if let index = statuses.firstIndex(where: { $0.id == status.id }),
|
if let index = statuses.firstIndex(where: { $0.id == status.id }),
|
||||||
index > 0,
|
index > 0,
|
||||||
statuses[index - 1].id == status.inReplyToId && status.inReplyToId != statuses.first?.id
|
statuses[index - 1].id == status.inReplyToId
|
||||||
{
|
{
|
||||||
isReplyToPrevious = true
|
if index == 1, statuses.count > 2 {
|
||||||
|
let nextStatus = statuses[2]
|
||||||
|
isReplyToPrevious = nextStatus.inReplyToId == status.id
|
||||||
|
} else if statuses.count == 2 {
|
||||||
|
isReplyToPrevious = false
|
||||||
|
} else {
|
||||||
|
isReplyToPrevious = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
let viewModel: StatusRowViewModel = .init(status: status,
|
let viewModel: StatusRowViewModel = .init(status: status,
|
||||||
client: client,
|
client: client,
|
||||||
|
|
Loading…
Reference in a new issue