Code quality
This commit is contained in:
parent
b6f0f12515
commit
c23437d45a
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 New Vector Ltd
|
* Copyright 2021 The Matrix.org Foundation C.I.C.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -122,25 +122,33 @@ class HomeDetailViewModel @AssistedInject constructor(@Assisted initialState: Ho
|
||||||
).asObservable()
|
).asObservable()
|
||||||
.throttleFirst(300, TimeUnit.MILLISECONDS)
|
.throttleFirst(300, TimeUnit.MILLISECONDS)
|
||||||
.subscribe {
|
.subscribe {
|
||||||
val dmInvites = session.getRoomSummaries(roomSummaryQueryParams {
|
val dmInvites = session.getRoomSummaries(
|
||||||
|
roomSummaryQueryParams {
|
||||||
memberships = listOf(Membership.INVITE)
|
memberships = listOf(Membership.INVITE)
|
||||||
roomCategoryFilter = RoomCategoryFilter.ONLY_DM
|
roomCategoryFilter = RoomCategoryFilter.ONLY_DM
|
||||||
}).size
|
}
|
||||||
|
).size
|
||||||
|
|
||||||
val roomsInvite = session.getRoomSummaries(roomSummaryQueryParams {
|
val roomsInvite = session.getRoomSummaries(
|
||||||
|
roomSummaryQueryParams {
|
||||||
memberships = listOf(Membership.INVITE)
|
memberships = listOf(Membership.INVITE)
|
||||||
roomCategoryFilter = RoomCategoryFilter.ONLY_ROOMS
|
roomCategoryFilter = RoomCategoryFilter.ONLY_ROOMS
|
||||||
}).size
|
}
|
||||||
|
).size
|
||||||
|
|
||||||
val dmRooms = session.getNotificationCountForRooms(roomSummaryQueryParams {
|
val dmRooms = session.getNotificationCountForRooms(
|
||||||
|
roomSummaryQueryParams {
|
||||||
memberships = listOf(Membership.JOIN)
|
memberships = listOf(Membership.JOIN)
|
||||||
roomCategoryFilter = RoomCategoryFilter.ONLY_DM
|
roomCategoryFilter = RoomCategoryFilter.ONLY_DM
|
||||||
})
|
}
|
||||||
|
)
|
||||||
|
|
||||||
val otherRooms = session.getNotificationCountForRooms(roomSummaryQueryParams {
|
val otherRooms = session.getNotificationCountForRooms(
|
||||||
|
roomSummaryQueryParams {
|
||||||
memberships = listOf(Membership.JOIN)
|
memberships = listOf(Membership.JOIN)
|
||||||
roomCategoryFilter = RoomCategoryFilter.ONLY_ROOMS
|
roomCategoryFilter = RoomCategoryFilter.ONLY_ROOMS
|
||||||
})
|
}
|
||||||
|
)
|
||||||
|
|
||||||
setState {
|
setState {
|
||||||
copy(
|
copy(
|
||||||
|
|
Loading…
Reference in New Issue