Some cleanup
This commit is contained in:
parent
9347bc8cf4
commit
3c7889c95d
|
@ -34,5 +34,4 @@ data class SpaceChildInfo(
|
||||||
val canonicalAlias: String?,
|
val canonicalAlias: String?,
|
||||||
val aliases: List<String>?,
|
val aliases: List<String>?,
|
||||||
val worldReadable: Boolean
|
val worldReadable: Boolean
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
|
@ -80,7 +80,7 @@ interface SpaceService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a live list of space summaries. This list is refreshed as soon as the data changes.
|
* Get a live list of space summaries. This list is refreshed as soon as the data changes.
|
||||||
* @return the [LiveData] of List[SpaceSummary]
|
* @return the [LiveData] of List[RoomSummary]
|
||||||
*/
|
*/
|
||||||
fun getSpaceSummariesLive(
|
fun getSpaceSummariesLive(
|
||||||
queryParams: SpaceSummaryQueryParams,
|
queryParams: SpaceSummaryQueryParams,
|
||||||
|
|
|
@ -255,7 +255,7 @@ internal class DefaultSpaceService @Inject constructor(
|
||||||
stateKey = QueryStringValue.IsEmpty
|
stateKey = QueryStringValue.IsEmpty
|
||||||
)
|
)
|
||||||
val powerLevelsContent = powerLevelsEvent?.content?.toModel<PowerLevelsContent>()
|
val powerLevelsContent = powerLevelsEvent?.content?.toModel<PowerLevelsContent>()
|
||||||
?: throw UnsupportedOperationException("Cannot add canonical child, missing powerlevel")
|
?: throw UnsupportedOperationException("Cannot add canonical child, missing power level")
|
||||||
val powerLevelsHelper = PowerLevelsHelper(powerLevelsContent)
|
val powerLevelsHelper = PowerLevelsHelper(powerLevelsContent)
|
||||||
if (!powerLevelsHelper.isUserAllowedToSend(userId, true, EventType.STATE_SPACE_CHILD)) {
|
if (!powerLevelsHelper.isUserAllowedToSend(userId, true, EventType.STATE_SPACE_CHILD)) {
|
||||||
throw UnsupportedOperationException("Cannot add canonical child, not enough power level")
|
throw UnsupportedOperationException("Cannot add canonical child, not enough power level")
|
||||||
|
|
|
@ -189,7 +189,7 @@ class SpaceManageRoomsViewModel @AssistedInject constructor(
|
||||||
val apiResult = session.spaceService().querySpaceChildren(
|
val apiResult = session.spaceService().querySpaceChildren(
|
||||||
spaceId = initialState.spaceId,
|
spaceId = initialState.spaceId,
|
||||||
from = nextToken,
|
from = nextToken,
|
||||||
knownStateList = knownResults.childrenState.orEmpty(),
|
knownStateList = knownResults.childrenState,
|
||||||
limit = paginationLimit
|
limit = paginationLimit
|
||||||
)
|
)
|
||||||
val newKnown = apiResult.children.mapNotNull { session.getRoomSummary(it.childRoomId) }
|
val newKnown = apiResult.children.mapNotNull { session.getRoomSummary(it.childRoomId) }
|
||||||
|
|
Loading…
Reference in New Issue