Files
session-ios/SessionUtilitiesKit/Utilities/DispatchTimeInterval+Utilities.swift
Morgan Pretty c99ee90ca6 Fixed a QA issue, a couple edge-cases and cleaned up some logic
• Added the "expired group" banner for when the first poll of an updated group doesn't retrieve config messages
• Removed a redundant base64 encode/decode
• Removed messy extra message validation function
• Fixed an edge-case where a member granted supplemental access to the group could end up incorrectly kicked under the right conditions
• Fixed an issue where the copy for deleting a deprecated legacy group wasn't accurate
2025-02-12 16:42:29 +11:00

17 lines
523 B
Swift

// Copyright © 2025 Rangeproof Pty Ltd. All rights reserved.
import Foundation
extension DispatchTimeInterval {
var milliseconds: Int {
switch self {
case .seconds(let s): return s * 1_000
case .milliseconds(let ms): return ms
case .microseconds(let us): return us / 1_000 // integer division truncates any remainder
case .nanoseconds(let ns): return ns / 1_000_000
case .never: return -1
@unknown default: return -1
}
}
}