Skip to content

Fixed #6445? #6685

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

Closed
wants to merge 2 commits into from
Closed

Fixed #6445? #6685

wants to merge 2 commits into from

Conversation

dimwight
Copy link
Contributor

@dimwight dimwight commented Apr 5, 2025

Fixes #6445

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

Obvious code improvement seems to fix issue.

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?

None?

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

Issue form selects new.xlsx.txt and single image a.png.txt demonstrate issue and fix.

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

If this needs a test I'd welcome advice on a class to start from or add to.

  • 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

@seadowg
Copy link
Member

seadowg commented Apr 9, 2025

Hi @dimwight! We'll hopefully get to looking at this in the next week or so.

Copy link
Member

@seadowg seadowg left a comment

Choose a reason for hiding this comment

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

DELETED

@seadowg seadowg dismissed their stale review April 25, 2025 14:52

Changed mind

@seadowg
Copy link
Member

seadowg commented Apr 25, 2025

@dbemke could you take a quick look and verify this fixes the issue?

Copy link
Member

@seadowg seadowg left a comment

Choose a reason for hiding this comment

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

This could be tested by adding a case to AudioVideoImageTextLabelTest that checks that the image view is GONE if setImage is passed a file that doesn't exist.

@dimwight
Copy link
Contributor Author

This could be tested by adding a case to AudioVideoImageTextLabelTest ...

Thanks for the suggestion, hope this is what is wanted.

@dimwight dimwight requested a review from seadowg May 14, 2025 09:03
@dbemke
Copy link

dbemke commented May 15, 2025

could you take a quick look and verify this fixes the issue?

I verified the issue - works as expected.

File imageFile = new File("file://image.png");

AudioVideoImageTextLabel audioVideoImageTextLabel = new AudioVideoImageTextLabel(activity);
audioVideoImageTextLabel.getImageView().setVisibility(VISIBLE);
Copy link
Member

Choose a reason for hiding this comment

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

We don't want to manipulate "internal" state for the object under test here, but I do see that you're trying to make sure that the image view is still GONE in the case where it was previously visible (like in the case where it's used in a RecyclerView for select choices). I'd tend to split this into two tests - one for an initial call of setImage and another to test the "recycling" flow. The latter could call setImage with an image that does exist first to check that the following call with an image that doesn't exist gets us the state we want.

@seadowg
Copy link
Member

seadowg commented Jul 23, 2025

I'm closing this for the moment as we haven't heard back for a while.

@seadowg seadowg closed this Jul 23, 2025
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.

Select with search appearance and missing media displays available media for choice with the missing media file
3 participants