mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-23 07:36:48 +00:00
Fix #1873
This commit is contained in:
parent
dfc213a19a
commit
77aa50ef19
1 changed files with 6 additions and 3 deletions
|
@ -251,9 +251,12 @@ 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 {
|
||||
statuses.insert(event.status, at: 0)
|
||||
statusesState = .display(statuses: statuses, nextPageState: .hasNextPage)
|
||||
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 })
|
||||
|
|
Loading…
Reference in a new issue