diff --git a/Monal/Classes/AVCallUI.swift b/Monal/Classes/AVCallUI.swift index 1d032fa3d7..82b3e04e0a 100644 --- a/Monal/Classes/AVCallUI.swift +++ b/Monal/Classes/AVCallUI.swift @@ -26,9 +26,9 @@ struct AVCallUI: View { self.delegate = delegate self.appDelegate = UIApplication.shared.delegate as! MonalAppDelegate self.formatter = DateComponentsFormatter() - formatter.allowedUnits = [.hour, .minute, .second] - formatter.unitsStyle = .positional - formatter.zeroFormattingBehavior = .pad + self.formatter.allowedUnits = [.hour, .minute, .second] + self.formatter.unitsStyle = .positional + self.formatter.zeroFormattingBehavior = .pad } var body: some View { diff --git a/Monal/Classes/ContactResources.swift b/Monal/Classes/ContactResources.swift index 4b78342e36..f5b0a0308c 100644 --- a/Monal/Classes/ContactResources.swift +++ b/Monal/Classes/ContactResources.swift @@ -52,10 +52,15 @@ struct ContactResources: View { resourceRowElement("Client Version:", Text(versionInfo.appVersion as String? ?? "")) resourceRowElement("OS:", Text(versionInfo.platformOs as String? ?? "")) if let lastInteraction = versionInfo.lastInteraction as Date? { - resourceRowElement("Last Interaction:", HStack { - Text(lastInteraction, style:.date) - Text(lastInteraction, style:.time) - }) + if lastInteraction.timeIntervalSince1970 == 0 { + resourceRowElement("Last Interaction:", Text("Currently Online")) + } else { + if #available(iOS 15, *) { + resourceRowElement("Last Interaction:", Text(lastInteraction.formatted(date:.numeric, time:.standard))) + } else { + resourceRowElement("Last Interaction:", Text("\(String(describing:lastInteraction))")) + } + } } else { resourceRowElement("Last Interaction:", Text("unsupported")) }