From 51c0ff7b7ae13dcf5ed0724f9a589be6316fad6a Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 11 Apr 2022 11:32:39 +0100 Subject: [PATCH 1/4] Don't wrongly show non-space invites in the space panel --- .../java/im/vector/app/features/spaces/SpaceListViewModel.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/spaces/SpaceListViewModel.kt b/vector/src/main/java/im/vector/app/features/spaces/SpaceListViewModel.kt index fff8475d2a..565189ac63 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/SpaceListViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/SpaceListViewModel.kt @@ -54,6 +54,7 @@ import org.matrix.android.sdk.api.session.group.groupSummaryQueryParams import org.matrix.android.sdk.api.session.room.RoomSortOrder import org.matrix.android.sdk.api.session.room.accountdata.RoomAccountDataTypes import org.matrix.android.sdk.api.session.room.model.Membership +import org.matrix.android.sdk.api.session.room.model.RoomType import org.matrix.android.sdk.api.session.room.roomSummaryQueryParams import org.matrix.android.sdk.api.session.room.summary.RoomAggregateNotificationCount import org.matrix.android.sdk.api.session.space.SpaceOrderUtils @@ -275,8 +276,7 @@ class SpaceListViewModel @AssistedInject constructor(@Assisted initialState: Spa val spaceSummaryQueryParams = roomSummaryQueryParams { memberships = listOf(Membership.JOIN, Membership.INVITE) displayName = QueryStringValue.IsNotEmpty - excludeType = listOf(/**RoomType.MESSAGING,$*/ - null) + includeType = listOf(RoomType.SPACE) } val flowSession = session.flow() From 4d3ccd236a8c98662f58493642d35579ca86f85f Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 11 Apr 2022 11:37:37 +0100 Subject: [PATCH 2/4] Changelog --- gradle/wrapper/gradle-wrapper.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e1e0c8dc42..df3b1008c6 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ +#Mon Apr 11 10:26:55 BST 2022 distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionSha256Sum=e6d864e3b5bc05cc62041842b306383fc1fefcec359e70cebb1d470a6094ca82 distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip -zipStoreBase=GRADLE_USER_HOME +distributionPath=wrapper/dists zipStorePath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME From 7a721a4d1d2dca75f29b3c690889dccb884f70be Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 11 Apr 2022 14:56:35 +0100 Subject: [PATCH 3/4] Actually changelog this time --- changelog.d/5731.bugfix | 1 + gradle/wrapper/gradle-wrapper.properties | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 changelog.d/5731.bugfix diff --git a/changelog.d/5731.bugfix b/changelog.d/5731.bugfix new file mode 100644 index 0000000000..5fb639b3ef --- /dev/null +++ b/changelog.d/5731.bugfix @@ -0,0 +1 @@ +Don't wrongly show non-space invites in the space panel. diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index df3b1008c6..e1e0c8dc42 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Apr 11 10:26:55 BST 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip distributionPath=wrapper/dists -zipStorePath=wrapper/dists +distributionSha256Sum=e6d864e3b5bc05cc62041842b306383fc1fefcec359e70cebb1d470a6094ca82 +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists From fd3bbabec5d6af55d789d3016b7e938145d4c1b8 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 12 Apr 2022 14:43:26 +0100 Subject: [PATCH 4/4] Simplify solution based on pr feedback --- .../im/vector/app/features/spaces/SpaceListViewModel.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/spaces/SpaceListViewModel.kt b/vector/src/main/java/im/vector/app/features/spaces/SpaceListViewModel.kt index 565189ac63..a239e939ea 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/SpaceListViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/SpaceListViewModel.kt @@ -54,8 +54,8 @@ import org.matrix.android.sdk.api.session.group.groupSummaryQueryParams import org.matrix.android.sdk.api.session.room.RoomSortOrder import org.matrix.android.sdk.api.session.room.accountdata.RoomAccountDataTypes import org.matrix.android.sdk.api.session.room.model.Membership -import org.matrix.android.sdk.api.session.room.model.RoomType import org.matrix.android.sdk.api.session.room.roomSummaryQueryParams +import org.matrix.android.sdk.api.session.room.spaceSummaryQueryParams import org.matrix.android.sdk.api.session.room.summary.RoomAggregateNotificationCount import org.matrix.android.sdk.api.session.space.SpaceOrderUtils import org.matrix.android.sdk.api.session.space.model.SpaceOrderContent @@ -273,10 +273,9 @@ class SpaceListViewModel @AssistedInject constructor(@Assisted initialState: Spa } private fun observeSpaceSummaries() { - val spaceSummaryQueryParams = roomSummaryQueryParams { + val params = spaceSummaryQueryParams { memberships = listOf(Membership.JOIN, Membership.INVITE) displayName = QueryStringValue.IsNotEmpty - includeType = listOf(RoomType.SPACE) } val flowSession = session.flow() @@ -288,7 +287,7 @@ class SpaceListViewModel @AssistedInject constructor(@Assisted initialState: Spa it.getOrNull() }, flowSession - .liveSpaceSummaries(spaceSummaryQueryParams), + .liveSpaceSummaries(params), session .accountDataService() .getLiveRoomAccountDataEvents(setOf(RoomAccountDataTypes.EVENT_TYPE_SPACE_ORDER))