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 updating the list of questions with audio widgets #5961

Merged
merged 2 commits into from
Feb 13, 2024

Conversation

grzesiek2010
Copy link
Member

@grzesiek2010 grzesiek2010 commented Feb 9, 2024

Closes #5955
Closes #5956

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

If there are multiple audio widgets on one page they all receive updates (recording status) if one of them is working. Those updates just pass null values so this doesn't change their state. If it's such a null value we shouldn't call the WidgetValueChangedListener because then it causes problems like the ones I have fixed in this pull request.

BTW. I'm not sure if other (not active) audio widgets should receive such null values as states (it might be redundant) but there is a test for that scenario so I didn't feel confident enough to change this behavior.

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?

We can focus on testing audio widgets here. The problem seemed to be visible only when more than one audio widget was used in a field-list but let's test simple cases with just one widget too.

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
  • 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 changed the title Collect 5956 Fixed updating the list of questions with audio widgets Feb 9, 2024
@grzesiek2010
Copy link
Member Author

@lognaturel I've assigned you as a reviewer but if you want @seadowg to do that when he's back please unusign yourself.

@grzesiek2010 grzesiek2010 marked this pull request as ready for review February 9, 2024 22:55
@grzesiek2010 grzesiek2010 added the high priority Should be looked at before other PRs/issues label Feb 9, 2024
Copy link
Member

@lognaturel lognaturel left a comment

Choose a reason for hiding this comment

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

Seems reasonable to me and I certainly don’t see any other obvious approach.

@srujner
Copy link

srujner commented Feb 13, 2024

Tested with Success!

Verified on device with Android 13

Verified cases:

@dbemke
Copy link

dbemke commented Feb 13, 2024

Tested with Success!

Verified on device with Android 10

@grzesiek2010 grzesiek2010 merged commit 5b66d1b into getodk:master Feb 13, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
behavior verified high priority Should be looked at before other PRs/issues
Projects
None yet
4 participants