mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Replace old visible rooms range with subscriptions in the room list. (#3014)
* Add a SubscriptionTracker actor to RoomProxy. * Request subscriptions when scrolling rooms. * Stop unsubscribing in preparation for Simplified Sliding Sync.
This commit is contained in:
@@ -8259,41 +8259,6 @@ class RoomProxyMock: RoomProxyProtocol {
|
||||
subscribeForUpdatesCallsCount += 1
|
||||
await subscribeForUpdatesClosure?()
|
||||
}
|
||||
//MARK: - unsubscribeFromUpdates
|
||||
|
||||
var unsubscribeFromUpdatesUnderlyingCallsCount = 0
|
||||
var unsubscribeFromUpdatesCallsCount: Int {
|
||||
get {
|
||||
if Thread.isMainThread {
|
||||
return unsubscribeFromUpdatesUnderlyingCallsCount
|
||||
} else {
|
||||
var returnValue: Int? = nil
|
||||
DispatchQueue.main.sync {
|
||||
returnValue = unsubscribeFromUpdatesUnderlyingCallsCount
|
||||
}
|
||||
|
||||
return returnValue!
|
||||
}
|
||||
}
|
||||
set {
|
||||
if Thread.isMainThread {
|
||||
unsubscribeFromUpdatesUnderlyingCallsCount = newValue
|
||||
} else {
|
||||
DispatchQueue.main.sync {
|
||||
unsubscribeFromUpdatesUnderlyingCallsCount = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var unsubscribeFromUpdatesCalled: Bool {
|
||||
return unsubscribeFromUpdatesCallsCount > 0
|
||||
}
|
||||
var unsubscribeFromUpdatesClosure: (() -> Void)?
|
||||
|
||||
func unsubscribeFromUpdates() {
|
||||
unsubscribeFromUpdatesCallsCount += 1
|
||||
unsubscribeFromUpdatesClosure?()
|
||||
}
|
||||
//MARK: - timelineFocusedOnEvent
|
||||
|
||||
var timelineFocusedOnEventEventIDNumberOfEventsUnderlyingCallsCount = 0
|
||||
|
||||
Reference in New Issue
Block a user