Made filtered key optional (#25)
This commit is contained in:
parent
749c4aef0b
commit
1c827d1f7e
|
@ -38,7 +38,7 @@ public protocol AnyStatus {
|
|||
var visibility: Visibility { get }
|
||||
var poll: Poll? { get }
|
||||
var spoilerText: String { get }
|
||||
var filtered: [Filtered] { get }
|
||||
var filtered: [Filtered]? { get }
|
||||
}
|
||||
|
||||
|
||||
|
@ -69,7 +69,7 @@ public struct Status: AnyStatus, Codable, Identifiable {
|
|||
public let visibility: Visibility
|
||||
public let poll: Poll?
|
||||
public let spoilerText: String
|
||||
public let filtered: [Filtered]
|
||||
public let filtered: [Filtered]?
|
||||
|
||||
public static func placeholder() -> Status {
|
||||
.init(id: UUID().uuidString,
|
||||
|
@ -128,5 +128,5 @@ public struct ReblogStatus: AnyStatus, Codable, Identifiable {
|
|||
public let visibility: Visibility
|
||||
public let poll: Poll?
|
||||
public let spoilerText: String
|
||||
public let filtered: [Filtered]
|
||||
public let filtered: [Filtered]?
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ public class StatusRowViewModel: ObservableObject {
|
|||
@Published var isFiltered: Bool = false
|
||||
|
||||
var filter: Filtered? {
|
||||
status.reblog?.filtered.first ?? status.filtered.first
|
||||
status.reblog?.filtered?.first ?? status.filtered?.first
|
||||
}
|
||||
|
||||
var client: Client?
|
||||
|
|
Loading…
Reference in New Issue