mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-26 10:11:00 +00:00
Make Meta.original optional
This commit is contained in:
parent
33ce6eadc2
commit
997d82047e
2 changed files with 3 additions and 3 deletions
|
@ -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 a new issue