mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Replace the old RoomInfoUpdateListener with the SDKListener
This commit is contained in:
committed by
Stefan Ceriu
parent
4e2e2649fc
commit
cad21daeea
@@ -74,6 +74,12 @@ extension SDKListener: RoomListLoadingStateListener where T == RoomListLoadingSt
|
||||
func onUpdate(state: RoomListLoadingState) { onUpdateClosure(state) }
|
||||
}
|
||||
|
||||
// MARK: Room
|
||||
|
||||
extension SDKListener: RoomInfoListener where T == RoomInfo {
|
||||
func call(roomInfo: RoomInfo) { onUpdateClosure(roomInfo) }
|
||||
}
|
||||
|
||||
// MARK: TimelineProxy
|
||||
|
||||
extension SDKListener: PaginationStatusListener where T == RoomPaginationStatus {
|
||||
|
||||
@@ -157,7 +157,7 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
|
||||
return
|
||||
}
|
||||
|
||||
roomInfoObservationToken = room.subscribeToRoomInfoUpdates(listener: RoomInfoUpdateListener { [weak self] roomInfo in
|
||||
roomInfoObservationToken = room.subscribeToRoomInfoUpdates(listener: SDKListener { [weak self] roomInfo in
|
||||
MXLog.info("Received room info update")
|
||||
self?.infoSubject.send(.init(roomInfo: roomInfo))
|
||||
})
|
||||
@@ -810,18 +810,6 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
private final class RoomInfoUpdateListener: RoomInfoListener {
|
||||
private let onUpdateClosure: (RoomInfo) -> Void
|
||||
|
||||
init(_ onUpdateClosure: @escaping (RoomInfo) -> Void) {
|
||||
self.onUpdateClosure = onUpdateClosure
|
||||
}
|
||||
|
||||
func call(roomInfo: RoomInfo) {
|
||||
onUpdateClosure(roomInfo)
|
||||
}
|
||||
}
|
||||
|
||||
private final class RoomTypingNotificationUpdateListener: TypingNotificationsListener {
|
||||
private let onUpdateClosure: ([String]) -> Void
|
||||
|
||||
|
||||
Reference in New Issue
Block a user