Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tracking number of spaces user joined #5300

Merged
merged 6 commits into from
Apr 7, 2022

Conversation

fedrunov
Copy link
Contributor

closes #5299

@github-actions
Copy link

github-actions bot commented Feb 22, 2022

Unit Test Results

110 files  +12  110 suites  +12   1m 18s ⏱️ +13s
195 tests +17  195 ✔️ +17  0 💤 ±0  0 ±0 
650 runs  +66  650 ✔️ +66  0 💤 ±0  0 ±0 

Results for commit 87df7a9. ± Comparison against base commit 5de7873.

This pull request removes 12 and adds 29 tests. Note that renamed tests count towards both.
im.vector.app.features.onboarding.OnboardingViewModelTest ‑ given a selected picture when handling save selected profile picture then updates upstream avatar and completes personalization
im.vector.app.features.onboarding.OnboardingViewModelTest ‑ given changing profile picture is not supported when updating display name then updates upstream user display name and completes personalization
im.vector.app.features.onboarding.OnboardingViewModelTest ‑ given changing profile picture is supported when updating display name then updates upstream user display name and moves to choose profile picture
im.vector.app.features.onboarding.OnboardingViewModelTest ‑ given homeserver does not support personalisation when registering account then updates state and emits account created event
im.vector.app.features.onboarding.OnboardingViewModelTest ‑ given no selected picture when saving selected profile picture then emits failure event
im.vector.app.features.onboarding.OnboardingViewModelTest ‑ given only supports changing profile picture when handling PersonalizeProfile then emits contents choose profile picture
im.vector.app.features.onboarding.OnboardingViewModelTest ‑ given supports changing display name when handling PersonalizeProfile then emits contents choose display name
im.vector.app.features.onboarding.OnboardingViewModelTest ‑ given upstream failure when handling display name update then emits failure event
im.vector.app.features.onboarding.OnboardingViewModelTest ‑ given upstream update avatar fails when saving selected profile picture then emits failure event
im.vector.app.features.onboarding.OnboardingViewModelTest ‑ when handling PostViewEvent then emits contents as view event
…
im.vector.app.features.location.LocationDataTest ‑ unstablePrefixTest
im.vector.app.features.location.domain.usecase.CompareLocationsUseCaseTest ‑ given 2 far away locations when calling execute then these locations are considered as not equal
im.vector.app.features.location.domain.usecase.CompareLocationsUseCaseTest ‑ given 2 very near locations when calling execute then these locations are considered as equal
im.vector.app.features.onboarding.DirectLoginUseCaseTest ‑ given direct authentication throws, when logging in directly, then returns failure result with original cause
im.vector.app.features.onboarding.DirectLoginUseCaseTest ‑ given wellknown fails with content, when logging in directly, then returns success with direct session result
im.vector.app.features.onboarding.DirectLoginUseCaseTest ‑ given wellknown fails without content, when logging in directly, then returns well known error
im.vector.app.features.onboarding.DirectLoginUseCaseTest ‑ given wellknown throws, when logging in directly, then returns failure result with original cause
im.vector.app.features.onboarding.DirectLoginUseCaseTest ‑ when logging in directly, then returns success with direct session result
im.vector.app.features.onboarding.OnboardingViewModelTest ‑ given a selected picture, when handling save selected profile picture, then updates upstream avatar and completes personalization
im.vector.app.features.onboarding.OnboardingViewModelTest ‑ given changing profile picture is not supported, when updating display name, then updates upstream user display name and completes personalization
…

♻️ This comment has been updated with latest results.

@github-actions
Copy link

Matrix SDK

Integration Tests Results:

  • [org.matrix.android.sdk.session]
    passed=
  • [org.matrix.android.sdk.account]
    passed=
  • [org.matrix.android.sdk.internal]
    passed=
  • [org.matrix.android.sdk.ordering]
    passed=
  • [org.matrix.android.sdk.PermalinkParserTest]
    passed=

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some thoughts about the implementation

@fedrunov fedrunov self-assigned this Mar 15, 2022
private fun observeSyncStatus(session: Session) {
session.getSyncStatusLive()
.asFlow()
.filterIsInstance<SyncStatusService.Status.IncrementalSyncDone>()
Copy link
Contributor

@ouchadam ouchadam Apr 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 added one line below

.filterIsInstance<SyncStatusService.Status.IncrementalSyncDone>()
.onEach {
handleJoinedSpaceStatistics(session.spaceService().getRootSpaceSummaries().size)
}.launchIn(session.coroutineScope)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to subscribe each time you switch space, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you think so? observeSyncStatus called when session is changed and it subscribes to a sync status.

Copy link
Contributor Author

@fedrunov fedrunov Apr 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check the latest changes, it's now a little bit different

@fedrunov fedrunov requested a review from ouchadam April 5, 2022 07:55
Copy link
Contributor

@ouchadam ouchadam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! will leave to @ganfra (and confirming the space switching behaviour)

@fedrunov fedrunov requested a review from ganfra April 6, 2022 07:50
Copy link
Member

@ganfra ganfra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, LGTM now, thanks

@fedrunov fedrunov merged commit 504a242 into develop Apr 7, 2022
@fedrunov fedrunov deleted the feature/nfe/joined_spaces_tracking branch April 7, 2022 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a user property for how many spaces the user is in
4 participants