mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-25 17:51:01 +00:00
Fix #1873
This commit is contained in:
parent
dfc213a19a
commit
77aa50ef19
1 changed files with 6 additions and 3 deletions
|
@ -251,10 +251,13 @@ import SwiftUI
|
|||
|
||||
func handleEvent(event: any StreamEvent, currentAccount: CurrentAccount) {
|
||||
if let event = event as? StreamEventUpdate {
|
||||
if event.status.account.id == currentAccount.account?.id, selectedTab == .statuses {
|
||||
if event.status.account.id == currentAccount.account?.id {
|
||||
if (event.status.inReplyToId == nil && selectedTab == .statuses) ||
|
||||
(event.status.inReplyToId != nil && selectedTab == .replies) {
|
||||
statuses.insert(event.status, at: 0)
|
||||
statusesState = .display(statuses: statuses, nextPageState: .hasNextPage)
|
||||
}
|
||||
}
|
||||
} else if let event = event as? StreamEventDelete {
|
||||
statuses.removeAll(where: { $0.id == event.status })
|
||||
statusesState = .display(statuses: statuses, nextPageState: .hasNextPage)
|
||||
|
|
Loading…
Reference in a new issue