diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/space/model/TopLevelSpaceComparator.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/space/model/TopLevelSpaceComparator.kt index e7289a277c..8af4f3a149 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/space/model/TopLevelSpaceComparator.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/space/model/TopLevelSpaceComparator.kt @@ -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"); * you may not use this file except in compliance with the License. diff --git a/vector/src/main/java/im/vector/app/features/spaces/SpaceSummaryController.kt b/vector/src/main/java/im/vector/app/features/spaces/SpaceSummaryController.kt index fd58af0408..828308007b 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/SpaceSummaryController.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/SpaceSummaryController.kt @@ -64,8 +64,7 @@ class SpaceSummaryController @Inject constructor( nonNullViewState.selectedGroupingMethod, nonNullViewState.rootSpacesOrdered, nonNullViewState.expandedStates, - nonNullViewState.homeAggregateCount, - nonNullViewState.spaceOrderInfo) + nonNullViewState.homeAggregateCount) if (!nonNullViewState.legacyGroups.isNullOrEmpty()) { genericFooterItem { @@ -108,8 +107,7 @@ class SpaceSummaryController @Inject constructor( selected: RoomGroupingMethod, rootSpaces: List?, expandedStates: Map, - homeCount: RoomAggregateNotificationCount, - spaceOrderInfo: Map?) { + homeCount: RoomAggregateNotificationCount) { val host = this spaceBetaHeaderItem { id("beta_header") diff --git a/vector/src/main/java/im/vector/app/features/spaces/SpacesListViewModel.kt b/vector/src/main/java/im/vector/app/features/spaces/SpacesListViewModel.kt index 73fcf0a249..d30d20fdd4 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/SpacesListViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/SpacesListViewModel.kt @@ -159,15 +159,15 @@ class SpacesListViewModel @AssistedInject constructor(@Assisted initialState: Sp is SpaceListAction.OpenSpaceInvite -> handleSelectSpaceInvite(action) is SpaceListAction.SelectLegacyGroup -> handleSelectGroup(action) is SpaceListAction.MoveSpace -> handleMoveSpace(action) - is SpaceListAction.OnEndDragging -> handleEndDragging(action) - is SpaceListAction.OnStartDragging -> handleStartDragging(action) + is SpaceListAction.OnEndDragging -> handleEndDragging() + is SpaceListAction.OnStartDragging -> handleStartDragging() } } // PRIVATE METHODS ***************************************************************************** var preDragExpandedState: Map? = null - private fun handleStartDragging(action: SpaceListAction.OnStartDragging) = withState { state -> + private fun handleStartDragging() = withState { state -> preDragExpandedState = state.expandedStates.toMap() setState { copy( @@ -178,7 +178,7 @@ class SpacesListViewModel @AssistedInject constructor(@Assisted initialState: Sp } } - private fun handleEndDragging(action: SpaceListAction.OnEndDragging) = withState { state -> + private fun handleEndDragging() { // restore expanded state setState { copy(