mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-30 04:01:02 +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 width: Int?
|
||||||
public let height: Int?
|
public let height: Int?
|
||||||
}
|
}
|
||||||
public let original: Meta
|
public let original: Meta?
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum SupportedType: String {
|
public enum SupportedType: String {
|
||||||
|
|
|
@ -31,8 +31,8 @@ public struct StatusMediaPreviewView: View {
|
||||||
if isCompact {
|
if isCompact {
|
||||||
return .init(width: 50, height: 50)
|
return .init(width: 50, height: 50)
|
||||||
}
|
}
|
||||||
if let width = media.meta?.original.width,
|
if let width = media.meta?.original?.width,
|
||||||
let height = media.meta?.original.height {
|
let height = media.meta?.original?.height {
|
||||||
return .init(width: CGFloat(width), height: CGFloat(height))
|
return .init(width: CGFloat(width), height: CGFloat(height))
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in a new issue