mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-09 07:45:25 +00:00
Made filtered key optional (#25)
This commit is contained in:
parent
749c4aef0b
commit
1c827d1f7e
2 changed files with 4 additions and 4 deletions
|
@ -38,7 +38,7 @@ public protocol AnyStatus {
|
||||||
var visibility: Visibility { get }
|
var visibility: Visibility { get }
|
||||||
var poll: Poll? { get }
|
var poll: Poll? { get }
|
||||||
var spoilerText: String { 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 visibility: Visibility
|
||||||
public let poll: Poll?
|
public let poll: Poll?
|
||||||
public let spoilerText: String
|
public let spoilerText: String
|
||||||
public let filtered: [Filtered]
|
public let filtered: [Filtered]?
|
||||||
|
|
||||||
public static func placeholder() -> Status {
|
public static func placeholder() -> Status {
|
||||||
.init(id: UUID().uuidString,
|
.init(id: UUID().uuidString,
|
||||||
|
@ -128,5 +128,5 @@ public struct ReblogStatus: AnyStatus, Codable, Identifiable {
|
||||||
public let visibility: Visibility
|
public let visibility: Visibility
|
||||||
public let poll: Poll?
|
public let poll: Poll?
|
||||||
public let spoilerText: String
|
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
|
@Published var isFiltered: Bool = false
|
||||||
|
|
||||||
var filter: Filtered? {
|
var filter: Filtered? {
|
||||||
status.reblog?.filtered.first ?? status.filtered.first
|
status.reblog?.filtered?.first ?? status.filtered?.first
|
||||||
}
|
}
|
||||||
|
|
||||||
var client: Client?
|
var client: Client?
|
||||||
|
|
Loading…
Reference in a new issue