Make Meta.original optional
This commit is contained in:
parent
33ce6eadc2
commit
997d82047e
|
@ -7,7 +7,7 @@ public struct MediaAttachement: Codable, Identifiable, Hashable {
|
|||
public let width: Int?
|
||||
public let height: Int?
|
||||
}
|
||||
public let original: Meta
|
||||
public let original: Meta?
|
||||
}
|
||||
|
||||
public enum SupportedType: String {
|
||||
|
|
|
@ -31,8 +31,8 @@ public struct StatusMediaPreviewView: View {
|
|||
if isCompact {
|
||||
return .init(width: 50, height: 50)
|
||||
}
|
||||
if let width = media.meta?.original.width,
|
||||
let height = media.meta?.original.height {
|
||||
if let width = media.meta?.original?.width,
|
||||
let height = media.meta?.original?.height {
|
||||
return .init(width: CGFloat(width), height: CGFloat(height))
|
||||
}
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue