Fix overflow issue

This commit is contained in:
ismailgulek
2021-03-19 02:52:52 +03:00
parent 81b9c5457c
commit 6e4b7c801a
@@ -299,7 +299,7 @@ class RoomGroupCallStatusBubbleCell: RoomBaseCallBubbleCell {
}
// ended, compute the diff between two dates
return TimeInterval(endDate - startDate)/MSEC_PER_SEC
return TimeInterval(max(0, Double(endDate) - Double(startDate)))/MSEC_PER_SEC
}
private func readableCallDuration(from startEvent: MXEvent?, endEvent: MXEvent?) -> String {