mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 08:15:24 +00:00
Update the SDK.
This commit is contained in:
@@ -4115,6 +4115,35 @@ open class ClientSDKMock: MatrixRustSDK.Client, @unchecked Sendable {
|
||||
}
|
||||
}
|
||||
|
||||
//MARK: - totalUnreadNotifications
|
||||
|
||||
private let totalUnreadNotificationsCallsCountLock = NSLock()
|
||||
private var totalUnreadNotificationsUnderlyingCallsCount = 0
|
||||
open var totalUnreadNotificationsCallsCount: Int {
|
||||
get { totalUnreadNotificationsCallsCountLock.withLock { totalUnreadNotificationsUnderlyingCallsCount } }
|
||||
set { totalUnreadNotificationsCallsCountLock.withLock { totalUnreadNotificationsUnderlyingCallsCount = newValue } }
|
||||
}
|
||||
open var totalUnreadNotificationsCalled: Bool {
|
||||
return totalUnreadNotificationsCallsCount > 0
|
||||
}
|
||||
|
||||
private let totalUnreadNotificationsReturnValueLock = NSLock()
|
||||
open var totalUnreadNotificationsUnderlyingReturnValue: UInt64!
|
||||
open var totalUnreadNotificationsReturnValue: UInt64! {
|
||||
get { totalUnreadNotificationsReturnValueLock.withLock { totalUnreadNotificationsUnderlyingReturnValue } }
|
||||
set { totalUnreadNotificationsReturnValueLock.withLock { totalUnreadNotificationsUnderlyingReturnValue = newValue } }
|
||||
}
|
||||
open var totalUnreadNotificationsClosure: (() -> UInt64)?
|
||||
|
||||
open override func totalUnreadNotifications() -> UInt64 {
|
||||
totalUnreadNotificationsCallsCountLock.withLock { totalUnreadNotificationsUnderlyingCallsCount += 1 }
|
||||
if let totalUnreadNotificationsClosure = totalUnreadNotificationsClosure {
|
||||
return totalUnreadNotificationsClosure()
|
||||
} else {
|
||||
return totalUnreadNotificationsReturnValue
|
||||
}
|
||||
}
|
||||
|
||||
//MARK: - trackRecentlyVisitedRoom
|
||||
|
||||
open var trackRecentlyVisitedRoomRoomThrowableError: Error?
|
||||
|
||||
Reference in New Issue
Block a user