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

Fixes inconsistent rooms in home behaviour #6511

Merged
merged 2 commits into from
Jul 12, 2022

Conversation

ouchadam
Copy link
Contributor

@ouchadam ouchadam commented Jul 8, 2022

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

  • Removes the 12 month unused legacy labs setting SETTINGS_LABS_SPACES_HOME_AS_ORPHAN migration for the showing rooms in home, it's the cause of a inconsistent state

Motivation and context

Fixes #6510 Inconsistent rooms in home behaviour

The app incorrectly returns the Show all rooms in home preference as enabled when it's meant to be disabled by default. This is caused by the migration logic from the previous flag not taking into account if the preference existed, causing us to always default to enabled.

Will also fix some flakiness in the UI Tests!

Screenshots / GIFs

Before After
before-space-rooms after-spaces-room

Tests

  • Have an account with a space and a room in that space
  • With a fresh install, log in and notice the room within the space is showing in home
  • Open the settings -> preference screen (don't change any toggles)
  • Quit and relaunch the app, notice the room from the space is no longer showing in home

Tested devices

  • Physical
  • Emulator
  • OS version(s): 29

…consistent value

- only uses the previous value if the key exists, otherwise we end up defaulting to true instead of false (which the preferences screen expects)
- manually deletes the key after migrating the value
@ouchadam ouchadam mentioned this pull request Jul 8, 2022
6 tasks
@ouchadam ouchadam added the A-Spaces Spaces, groups, communities label Jul 11, 2022
@ouchadam ouchadam requested review from a team and onurays and removed request for a team July 11, 2022 08:20
}

private fun labsSpacesOnlyOrphansInHome(): Boolean {
return defaultPrefs.getBoolean(SETTINGS_LABS_SPACES_HOME_AS_ORPHAN, false)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have to live with this or can we remove this flag in the next releases?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good question! it looks like the orphan flag was added 14 months ago then replaced 2 months later

as it's been over a year I would lean towards removing the migration entirely! what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

I totally agree. They (if there are any users) shouldn't be so surprised.

Copy link
Contributor Author

@ouchadam ouchadam Jul 12, 2022

Choose a reason for hiding this comment

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

removed ♻️ 6266b20

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM! Feel free to merge.

Copy link
Contributor

@onurays onurays left a comment

Choose a reason for hiding this comment

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

LGTM! Just added a question.

@sonarcloud
Copy link

sonarcloud bot commented Jul 12, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@ouchadam ouchadam merged commit a5bf25f into develop Jul 12, 2022
@ouchadam ouchadam deleted the feature/rooms-in-space-default branch July 12, 2022 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Spaces Spaces, groups, communities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rooms in spaces unexpectedly change behaviour when visiting settings -> preferences
2 participants