mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 01:15:54 +03:00
Move rx logs to verbose
This commit is contained in:
parent
845f3f5ad1
commit
d436d3b8d4
2 changed files with 11 additions and 11 deletions
|
@ -42,7 +42,7 @@ class RxRoom(private val room: Room, private val session: Session) {
|
|||
val summaryObservable = room.getRoomSummaryLive()
|
||||
.asObservable()
|
||||
.startWith(room.roomSummary().toOptional())
|
||||
.doOnNext { Timber.d("RX: summary emitted for: ${it.getOrNull()?.roomId}") }
|
||||
.doOnNext { Timber.v("RX: summary emitted for: ${it.getOrNull()?.roomId}") }
|
||||
|
||||
val memberIdsChangeObservable = summaryObservable
|
||||
.map {
|
||||
|
@ -56,7 +56,7 @@ class RxRoom(private val room: Room, private val session: Session) {
|
|||
}
|
||||
}.orEmpty()
|
||||
}.distinctUntilChanged()
|
||||
.doOnNext { Timber.d("RX: memberIds emitted. Size: ${it.size}") }
|
||||
.doOnNext { Timber.v("RX: memberIds emitted. Size: ${it.size}") }
|
||||
|
||||
// Observe the device info of the users in the room
|
||||
val cryptoDeviceInfoObservable = memberIdsChangeObservable
|
||||
|
@ -68,9 +68,9 @@ class RxRoom(private val room: Room, private val session: Session) {
|
|||
membersIds
|
||||
}
|
||||
.startWith(membersIds)
|
||||
.doOnNext { Timber.d("RX: CryptoDeviceInfo emitted. Size: ${it.size}") }
|
||||
.doOnNext { Timber.v("RX: CryptoDeviceInfo emitted. Size: ${it.size}") }
|
||||
}
|
||||
.doOnNext { Timber.d("RX: cryptoDeviceInfo emitted 2. Size: ${it.size}") }
|
||||
.doOnNext { Timber.v("RX: cryptoDeviceInfo emitted 2. Size: ${it.size}") }
|
||||
|
||||
val roomEncryptionTrustLevelObservable = cryptoDeviceInfoObservable
|
||||
.map { userIds ->
|
||||
|
@ -80,7 +80,7 @@ class RxRoom(private val room: Room, private val session: Session) {
|
|||
session.getCrossSigningService().getTrustLevelForUsers(userIds).toOptional()
|
||||
}
|
||||
}
|
||||
.doOnNext { Timber.d("RX: roomEncryptionTrustLevel emitted: ${it.getOrNull()?.name}") }
|
||||
.doOnNext { Timber.v("RX: roomEncryptionTrustLevel emitted: ${it.getOrNull()?.name}") }
|
||||
|
||||
return Observable
|
||||
.combineLatest<Optional<RoomSummary>, Optional<RoomEncryptionTrustLevel>, Optional<RoomSummary>>(
|
||||
|
@ -92,18 +92,18 @@ class RxRoom(private val room: Room, private val session: Session) {
|
|||
).toOptional()
|
||||
}
|
||||
)
|
||||
.doOnNext { Timber.d("RX: final room summary emitted for ${it.getOrNull()?.roomId}") }
|
||||
.doOnNext { Timber.v("RX: final room summary emitted for ${it.getOrNull()?.roomId}") }
|
||||
}
|
||||
|
||||
fun liveRoomMembers(queryParams: RoomMemberQueryParams): Observable<List<RoomMemberSummary>> {
|
||||
val roomMembersObservable = room.getRoomMembersLive(queryParams).asObservable()
|
||||
.startWith(room.getRoomMembers(queryParams))
|
||||
.doOnNext { Timber.d("RX: room members emitted. Size: ${it.size}") }
|
||||
.doOnNext { Timber.v("RX: room members emitted. Size: ${it.size}") }
|
||||
|
||||
// TODO Do it only for room members of the room (switchMap)
|
||||
val cryptoDeviceInfoObservable = session.getLiveCryptoDeviceInfo().asObservable()
|
||||
.startWith(emptyList<CryptoDeviceInfo>())
|
||||
.doOnNext { Timber.d("RX: cryptoDeviceInfo emitted. Size: ${it.size}") }
|
||||
.doOnNext { Timber.v("RX: cryptoDeviceInfo emitted. Size: ${it.size}") }
|
||||
|
||||
return Observable
|
||||
.combineLatest<List<RoomMemberSummary>, List<CryptoDeviceInfo>, List<RoomMemberSummary>>(
|
||||
|
@ -122,7 +122,7 @@ class RxRoom(private val room: Room, private val session: Session) {
|
|||
}
|
||||
}
|
||||
)
|
||||
.doOnNext { Timber.d("RX: final room members emitted. Size: ${it.size}") }
|
||||
.doOnNext { Timber.v("RX: final room members emitted. Size: ${it.size}") }
|
||||
}
|
||||
|
||||
fun liveAnnotationSummary(eventId: String): Observable<Optional<EventAnnotationsSummary>> {
|
||||
|
|
|
@ -41,11 +41,11 @@ class RxSession(private val session: Session) {
|
|||
fun liveRoomSummaries(queryParams: RoomSummaryQueryParams): Observable<List<RoomSummary>> {
|
||||
val summariesObservable = session.getRoomSummariesLive(queryParams).asObservable()
|
||||
.startWith(session.getRoomSummaries(queryParams))
|
||||
.doOnNext { Timber.d("RX: summaries emitted: size: ${it.size}") }
|
||||
.doOnNext { Timber.v("RX: summaries emitted: size: ${it.size}") }
|
||||
|
||||
val cryptoDeviceInfoObservable = session.getLiveCryptoDeviceInfo().asObservable()
|
||||
.startWith(emptyList<CryptoDeviceInfo>())
|
||||
.doOnNext { Timber.d("RX: crypto device info emitted: size: ${it.size}") }
|
||||
.doOnNext { Timber.v("RX: crypto device info emitted: size: ${it.size}") }
|
||||
|
||||
return Observable
|
||||
.combineLatest<List<RoomSummary>, List<CryptoDeviceInfo>, List<RoomSummary>>(
|
||||
|
|
Loading…
Reference in a new issue