mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-03 20:47:32 +01:00
Ensure proper grouping for notifications tab query
Change-Id: I58e8a85fd5e2c938d55189825daf7820f826da1e
This commit is contained in:
parent
a66d6c42b5
commit
2f4e9e3017
@ -256,7 +256,9 @@ internal class RoomSummaryDataSource @Inject constructor(@SessionDatabase privat
|
||||
when (it) {
|
||||
RoomCategoryFilter.ONLY_DM -> query.equalTo(RoomSummaryEntityFields.IS_DIRECT, true)
|
||||
RoomCategoryFilter.ONLY_ROOMS -> query.equalTo(RoomSummaryEntityFields.IS_DIRECT, false)
|
||||
RoomCategoryFilter.ONLY_WITH_NOTIFICATIONS -> query.greaterThan(RoomSummaryEntityFields.NOTIFICATION_COUNT, 0).or().equalTo(RoomSummaryEntityFields.MARKED_UNREAD, true)
|
||||
RoomCategoryFilter.ONLY_WITH_NOTIFICATIONS -> query.beginGroup()
|
||||
.greaterThan(RoomSummaryEntityFields.NOTIFICATION_COUNT, 0).or()
|
||||
.equalTo(RoomSummaryEntityFields.MARKED_UNREAD, true).endGroup()
|
||||
RoomCategoryFilter.ALL -> {
|
||||
// nop
|
||||
}
|
||||
@ -283,7 +285,9 @@ internal class RoomSummaryDataSource @Inject constructor(@SessionDatabase privat
|
||||
when (queryParams.roomCategoryFilter) {
|
||||
RoomCategoryFilter.ONLY_DM -> query.equalTo(RoomSummaryEntityFields.IS_DIRECT, true)
|
||||
RoomCategoryFilter.ONLY_ROOMS -> query.equalTo(RoomSummaryEntityFields.IS_DIRECT, false)
|
||||
RoomCategoryFilter.ONLY_WITH_NOTIFICATIONS -> query.greaterThan(RoomSummaryEntityFields.NOTIFICATION_COUNT, 0)
|
||||
RoomCategoryFilter.ONLY_WITH_NOTIFICATIONS -> query.beginGroup()
|
||||
.greaterThan(RoomSummaryEntityFields.NOTIFICATION_COUNT, 0).or()
|
||||
.equalTo(RoomSummaryEntityFields.MARKED_UNREAD, true).endGroup()
|
||||
RoomCategoryFilter.ALL -> Unit // nop
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user