mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-02-18 02:35:15 +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
|
// Decode from server
|
||||||
let container = try decoder.singleValueContainer()
|
let container = try decoder.singleValueContainer()
|
||||||
let stringDate = try container.decode(String.self)
|
let stringDate = try container.decode(String.self)
|
||||||
asDate = Self.createdAtDateFormatter.date(from: stringDate)!
|
asDate = Self.createdAtDateFormatter.date(from: stringDate) ?? Date()
|
||||||
} catch {
|
} catch {
|
||||||
// Decode from cache
|
// Decode from cache
|
||||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
|
|
|
@ -235,6 +235,7 @@ public struct StatusEditorView: View {
|
||||||
avatarSize: .status)
|
avatarSize: .status)
|
||||||
} else {
|
} else {
|
||||||
AvatarView(url: account.avatar, size: .status)
|
AvatarView(url: account.avatar, size: .status)
|
||||||
|
.environmentObject(theme)
|
||||||
}
|
}
|
||||||
VStack(alignment: .leading, spacing: 4) {
|
VStack(alignment: .leading, spacing: 4) {
|
||||||
privacyMenu
|
privacyMenu
|
||||||
|
|
Loading…
Reference in a new issue