Replace the old RoomInfoUpdateListener with the SDKListener

This commit is contained in:
Stefan Ceriu
2025-04-29 19:20:17 +03:00
committed by Stefan Ceriu
parent 4e2e2649fc
commit cad21daeea
5 changed files with 14 additions and 28 deletions
@@ -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