From e364a36ee6acbbb65676d3a8b23555a36412d79e Mon Sep 17 00:00:00 2001 From: Valere Date: Tue, 16 Mar 2021 09:42:10 +0100 Subject: [PATCH] cleaning --- .../java/org/matrix/android/sdk/api/session/room/Room.kt | 3 ++- .../internal/database/model/SpaceParentSummaryEntity.kt | 4 ---- .../sdk/internal/session/space/DefaultSpaceService.kt | 7 ------- .../im/vector/app/features/permalink/PermalinkHandler.kt | 2 +- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/Room.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/Room.kt index 5f2bc716f6..1bbc090ef0 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/Room.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/Room.kt @@ -92,6 +92,7 @@ interface Room : limit: Int, beforeLimit: Int, afterLimit: Int, -// fun getSpaceParents(): List includeProfile: Boolean): SearchResult + + fun asSpace(): Space? } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/model/SpaceParentSummaryEntity.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/model/SpaceParentSummaryEntity.kt index af32cd2b83..30517717f4 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/model/SpaceParentSummaryEntity.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/model/SpaceParentSummaryEntity.kt @@ -39,10 +39,6 @@ internal open class SpaceParentSummaryEntity( var viaServers: RealmList = RealmList() -// var child: RoomSummaryEntity? = null, - -// var level: Int = 0 - ) : RealmObject() { companion object diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/space/DefaultSpaceService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/space/DefaultSpaceService.kt index cdd2673fde..ab104901d5 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/space/DefaultSpaceService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/space/DefaultSpaceService.kt @@ -51,21 +51,14 @@ internal class DefaultSpaceService @Inject constructor( @SessionDatabase private val monarchy: Monarchy, @UserId private val userId: String, private val createSpaceTask: CreateSpaceTask, -// private val joinRoomTask: JoinRoomTask, private val joinSpaceTask: JoinSpaceTask, private val spaceGetter: SpaceGetter, -// private val markAllRoomsReadTask: MarkAllRoomsReadTask, -// private val updateBreadcrumbsTask: UpdateBreadcrumbsTask, -// private val roomIdByAliasTask: GetRoomIdByAliasTask, -// private val deleteRoomAliasTask: DeleteRoomAliasTask, private val roomGetter: RoomGetter, private val roomSummaryDataSource: RoomSummaryDataSource, private val stateEventDataSource: StateEventDataSource, private val peekSpaceTask: PeekSpaceTask, private val resolveSpaceInfoTask: ResolveSpaceInfoTask, private val leaveRoomTask: LeaveRoomTask -// private val roomChangeMembershipStateDataSource: RoomChangeMembershipStateDataSource, -// private val taskExecutor: TaskExecutor ) : SpaceService { override suspend fun createSpace(params: CreateSpaceParams): String { diff --git a/vector/src/main/java/im/vector/app/features/permalink/PermalinkHandler.kt b/vector/src/main/java/im/vector/app/features/permalink/PermalinkHandler.kt index 1fea25159f..aa977730db 100644 --- a/vector/src/main/java/im/vector/app/features/permalink/PermalinkHandler.kt +++ b/vector/src/main/java/im/vector/app/features/permalink/PermalinkHandler.kt @@ -148,7 +148,7 @@ class PermalinkHandler @Inject constructor(private val activeSessionHolder: Acti val roomSummary = session.getRoomSummary(roomId) val membership = roomSummary?.membership val eventId = permalinkData.eventId - val roomAlias = permalinkData.getRoomAliasOrNull() +// val roomAlias = permalinkData.getRoomAliasOrNull() val isSpace = roomSummary?.roomType == RoomType.SPACE return when { membership == Membership.BAN -> context.toast(R.string.error_opening_banned_room)