mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-13 04:51:21 +00:00
Fix two crashes
This commit is contained in:
parent
bfce92d71e
commit
b1424aadd0
2 changed files with 2 additions and 1 deletions
|
@ -47,7 +47,7 @@ public struct ServerDate: Codable, Hashable, Equatable {
|
|||
// Decode from server
|
||||
let container = try decoder.singleValueContainer()
|
||||
let stringDate = try container.decode(String.self)
|
||||
asDate = Self.createdAtDateFormatter.date(from: stringDate)!
|
||||
asDate = Self.createdAtDateFormatter.date(from: stringDate) ?? Date()
|
||||
} catch {
|
||||
// Decode from cache
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
|
|
|
@ -235,6 +235,7 @@ public struct StatusEditorView: View {
|
|||
avatarSize: .status)
|
||||
} else {
|
||||
AvatarView(url: account.avatar, size: .status)
|
||||
.environmentObject(theme)
|
||||
}
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
privacyMenu
|
||||
|
|
Loading…
Reference in a new issue