mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 02:15:35 +03:00
Remove RoomCategoryFilter.ALL
Prefer nullability for API coherency of `RoomSummaryQueryParams`
This commit is contained in:
parent
8d7a54a6cf
commit
8843fe0a54
5 changed files with 1 additions and 8 deletions
|
@ -20,5 +20,4 @@ enum class RoomCategoryFilter {
|
|||
ONLY_DM,
|
||||
ONLY_ROOMS,
|
||||
ONLY_WITH_NOTIFICATIONS,
|
||||
ALL
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ data class RoomSummaryQueryParams(
|
|||
var displayName: QueryStringValue = QueryStringValue.NoCondition
|
||||
var canonicalAlias: QueryStringValue = QueryStringValue.NoCondition
|
||||
var memberships: List<Membership> = Membership.all()
|
||||
var roomCategoryFilter: RoomCategoryFilter? = RoomCategoryFilter.ALL
|
||||
var roomCategoryFilter: RoomCategoryFilter? = null
|
||||
var roomTagQueryFilter: RoomTagQueryFilter? = null
|
||||
var excludeType: List<String?>? = listOf(RoomType.SPACE)
|
||||
var includeType: List<String?>? = null
|
||||
|
|
|
@ -279,9 +279,6 @@ internal class RoomSummaryDataSource @Inject constructor(
|
|||
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.ALL -> {
|
||||
// nop
|
||||
}
|
||||
}
|
||||
}
|
||||
queryParams.roomTagQueryFilter?.let {
|
||||
|
@ -306,7 +303,6 @@ internal class RoomSummaryDataSource @Inject constructor(
|
|||
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.ALL -> Unit // nop
|
||||
null -> Unit
|
||||
}
|
||||
|
||||
|
|
|
@ -97,7 +97,6 @@ class RoomListSectionBuilderGroup(
|
|||
true
|
||||
) {
|
||||
it.memberships = listOf(Membership.INVITE)
|
||||
it.roomCategoryFilter = RoomCategoryFilter.ALL
|
||||
it.activeGroupId = actualGroupId
|
||||
}
|
||||
}
|
||||
|
|
|
@ -298,7 +298,6 @@ class RoomListSectionBuilderSpace(
|
|||
countRoomAsNotif = true
|
||||
) {
|
||||
it.memberships = listOf(Membership.INVITE)
|
||||
it.roomCategoryFilter = RoomCategoryFilter.ALL
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue