Cleanup
This commit is contained in:
parent
ac8303bb99
commit
40907a71b6
|
@ -39,12 +39,6 @@ fun spaceSummaryQueryParams(init: (RoomSummaryQueryParams.Builder.() -> Unit) =
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
enum class RoomCategoryFilter {
|
|
||||||
ONLY_DM,
|
|
||||||
ONLY_ROOMS,
|
|
||||||
ALL
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class can be used to filter room summaries to use with:
|
* This class can be used to filter room summaries to use with:
|
||||||
* [org.matrix.android.sdk.api.session.room.Room] and [org.matrix.android.sdk.api.session.room.RoomService]
|
* [org.matrix.android.sdk.api.session.room.Room] and [org.matrix.android.sdk.api.session.room.RoomService]
|
||||||
|
@ -59,11 +53,10 @@ data class RoomSummaryQueryParams(
|
||||||
val excludeType: List<String?>?,
|
val excludeType: List<String?>?,
|
||||||
val includeType: List<String?>?,
|
val includeType: List<String?>?,
|
||||||
val activeSpaceFilter: ActiveSpaceFilter?,
|
val activeSpaceFilter: ActiveSpaceFilter?,
|
||||||
var activeGroupId: String? = null
|
val activeGroupId: String? = null
|
||||||
) {
|
) {
|
||||||
|
|
||||||
class Builder {
|
class Builder {
|
||||||
|
|
||||||
var roomId: QueryStringValue = QueryStringValue.IsNotEmpty
|
var roomId: QueryStringValue = QueryStringValue.IsNotEmpty
|
||||||
var displayName: QueryStringValue = QueryStringValue.IsNotEmpty
|
var displayName: QueryStringValue = QueryStringValue.IsNotEmpty
|
||||||
var canonicalAlias: QueryStringValue = QueryStringValue.NoCondition
|
var canonicalAlias: QueryStringValue = QueryStringValue.NoCondition
|
||||||
|
|
|
@ -300,8 +300,8 @@ internal class RoomSummaryDataSource @Inject constructor(@SessionDatabase privat
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (queryParams.activeGroupId != null) {
|
queryParams.activeGroupId?.let { activeGroupId ->
|
||||||
query.contains(RoomSummaryEntityFields.GROUP_IDS, queryParams.activeGroupId!!)
|
query.contains(RoomSummaryEntityFields.GROUP_IDS, activeGroupId)
|
||||||
}
|
}
|
||||||
return query
|
return query
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue