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

Fixed resetting layers to none in preferences #6193

Merged
merged 5 commits into from
Jun 17, 2024

Conversation

grzesiek2010
Copy link
Member

@grzesiek2010 grzesiek2010 commented Jun 14, 2024

Closes #6192

Why is this the best possible solution? Were any other approaches considered?

It was a stupid mistake with an extra line left in https://github.com/getodk/collect/pull/6184/files#diff-36f54d94492ef437156984d26797b377ab56d837b458397629723df876d81e1dR159
I've added more tests to cover this case.
The only additional change worth discussing is that I've reworked the get method from DirectoryReferenceLayerRepository.kt so that now it doesn't return a layer if it's an unsupported one. Thanks to that I don't have to check if a layer is supported in preferences. This might look weird at first glance but it matches what getAll does so now it's consistent.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

Everything that is related to displaying proper layers/layer names is at risk.

Do we need any specific form for testing your changes? If so, please attach one.

No.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

No.

Before submitting this PR, please make sure you have:

  • added or modified tests for any new or changed behavior
  • run ./gradlew connectedAndroidTest (or ./gradlew testLab) and confirmed all checks still pass
  • added a comment above any new strings describing it for translators
  • added any new strings with date formatting to DateFormatsTest
  • verified that any code or assets from external sources are properly credited in comments and/or in the about file.
  • verified that any new UI elements use theme colors. UI Components Style guidelines

@grzesiek2010 grzesiek2010 added the high priority Should be looked at before other PRs/issues label Jun 14, 2024
@grzesiek2010 grzesiek2010 marked this pull request as ready for review June 14, 2024 12:40
@seadowg seadowg removed the high priority Should be looked at before other PRs/issues label Jun 17, 2024
@seadowg seadowg merged commit fb11c14 into getodk:master Jun 17, 2024
6 checks passed
@WKobus
Copy link

WKobus commented Jun 19, 2024

Tested with success

Verified on device with android 14

Verified cases:

@dbemke
Copy link

dbemke commented Jun 19, 2024

Tested with success

Verified on device with android 10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Selected offline layer gets deselected after going to settings – maps while the form is opened
4 participants