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

Re-organize location settings flags [PSF-1062] #6244

Merged
merged 4 commits into from
Jun 8, 2022

Conversation

onurays
Copy link
Contributor

@onurays onurays commented Jun 6, 2022

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

We have many settings flags to be able to enable static/live location sharing:

  • Settings > Preferences > Enable Location Sharing
  • BuildSettings.enableLocationSharing
  • Settings > Labs > Enable Live Location Sharing

To simplify the location sharing feature this PR suggests:

  • Remove the “Enable location sharing” from preferences
  • Enable location sharing by default using the Build config field
  • Use the build config field to check whether the location sharing option should be visible in the composer view
  • Remove the “Render user locations in timeline” labs flag because there is no performance concern anymore

Motivation and context

Screenshots / GIFs

Tests

  • You should see the location sharing icon in composer menu by default and able to share/render a static location
  • You can share live location after enabling it under Settings > Labs > Enable Live Location Sharing

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

@onurays onurays requested review from a team, ouchadam and bmarty and removed request for a team June 6, 2022 22:06
@github-actions
Copy link

github-actions bot commented Jun 7, 2022

Unit Test Results

0 files   - 148  0 suites   - 148   0s ⏱️ - 2m 44s
0 tests  - 237  0 ✔️  - 237  0 💤 ±0  0 ±0 
0 runs   - 790  0 ✔️  - 790  0 💤 ±0  0 ±0 

Results for commit 4b862be. ± Comparison against base commit 0ef67b6.

@@ -1552,7 +1553,7 @@ class TimelineFragment @Inject constructor(
attachmentTypeSelector = AttachmentTypeSelectorView(vectorBaseActivity, vectorBaseActivity.layoutInflater, this@TimelineFragment)
attachmentTypeSelector.setAttachmentVisibility(
AttachmentTypeSelectorView.Type.LOCATION,
vectorPreferences.isLocationSharingEnabled()
BuildConfig.enableLocationSharing
Copy link
Contributor

Choose a reason for hiding this comment

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

if we use the VectorFeatures with the default value set to BuildConfig.enableLocationSharing then we'll also be able to enable/disable location sharing without recompiling the app

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 👍 The comment about using VectorFeatures is non blocking for me

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 7, 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

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.

LGTM, thanks!

@onurays onurays merged commit 3f49101 into develop Jun 8, 2022
@onurays onurays deleted the feature/ons/organize_location_settings_flags branch June 8, 2022 10:03
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.

3 participants