mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-23 00:40:59 +00:00
Status detail: Handle status update
This commit is contained in:
parent
6e47f9410d
commit
3e88d89de3
1 changed files with 7 additions and 7 deletions
|
@ -109,14 +109,14 @@ class StatusDetailViewModel: ObservableObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleEvent(event: any StreamEvent, currentAccount: Account?) {
|
func handleEvent(event: any StreamEvent, currentAccount: Account?) {
|
||||||
if let event = event as? StreamEventUpdate,
|
Task {
|
||||||
event.status.account.id == currentAccount?.id
|
if let event = event as? StreamEventUpdate,
|
||||||
{
|
event.status.account.id == currentAccount?.id {
|
||||||
Task {
|
|
||||||
await fetchStatusDetail(animate: true)
|
await fetchStatusDetail(animate: true)
|
||||||
}
|
} else if let event = event as? StreamEventStatusUpdate,
|
||||||
} else if event is StreamEventDelete {
|
event.status.account.id == currentAccount?.id {
|
||||||
Task {
|
await fetchStatusDetail(animate: true)
|
||||||
|
} else if event is StreamEventDelete {
|
||||||
await fetchStatusDetail(animate: true)
|
await fetchStatusDetail(animate: true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue