Fixes
This commit is contained in:
parent
f743adb1df
commit
e81ea4ee81
|
@ -103,11 +103,14 @@ class NotificationsViewModel: ObservableObject {
|
|||
}
|
||||
|
||||
func handleEvent(event: any StreamEvent) {
|
||||
if selectedType == nil,
|
||||
let event = event as? StreamEventNotification,
|
||||
if let event = event as? StreamEventNotification,
|
||||
!notifications.contains(where: { $0.id == event.notification.id })
|
||||
{
|
||||
if let selectedType, event.notification.type == selectedType.rawValue {
|
||||
notifications.insert(event.notification, at: 0)
|
||||
} else {
|
||||
notifications.insert(event.notification, at: 0)
|
||||
}
|
||||
state = .display(notifications: notifications, nextPageState: .hasNextPage)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ public struct StatusMediaPreviewView: View {
|
|||
if attachments.count == 1 {
|
||||
return 300
|
||||
}
|
||||
return attachments.count > 2 ? 100 : 200
|
||||
return attachments.count > 2 ? 150 : 200
|
||||
}
|
||||
|
||||
private func size(for media: MediaAttachment) -> CGSize? {
|
||||
|
@ -181,7 +181,7 @@ public struct StatusMediaPreviewView: View {
|
|||
placeholder: {
|
||||
RoundedRectangle(cornerRadius: 4)
|
||||
.fill(Color.gray)
|
||||
.frame(maxHeight: isNotifications ? imageMaxHeight : nil)
|
||||
.frame(height: imageMaxHeight)
|
||||
.shimmering()
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue