Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Alert images that are flagged for overwrite fail to display #2109

Closed
joeljfischer opened this issue Sep 21, 2022 · 0 comments · Fixed by #2110
Closed

Alert images that are flagged for overwrite fail to display #2109

joeljfischer opened this issue Sep 21, 2022 · 0 comments · Fixed by #2110
Assignees
Labels
bug A defect in the library manager-screen Relating to the manager layer - screen managers

Comments

@joeljfischer
Copy link
Contributor

Bug Summary

The SDLPresentAlertOperation fails to display an image marked for overwrite because of this line:

- (SDLAlert *)alertRPC {
...
    alert.alertIcon = ([self sdl_supportsAlertIcon] && ![self.fileManager fileNeedsUpload:self.alertView.icon]) ? self.alertView.icon.imageRPC : nil;
...
}

The check for fileNeedsUpload returns true if the image is flagged for overwrite, which results in a failure to display the image.

Additional options were considered, like mixing hasUploadedFile and isStaticIcon checks, but those have an issue where if an overwrite file upload fails the old image will be shown, when it should not show any image instead.

Reproduction Steps

  1. Upload an image with name "test"
  2. Create an AlertView with an icon artwork overwriting "test"
  3. Present the image through the screen manager

Expected Behavior:
The overwriting image should be shown

Observed Behavior:
No image is shown

iOS Version(s)

n/a

sdl_ios Version

7.5.0

Testing Environment(s)

Observed through code

Relevant log output

No response

@joeljfischer joeljfischer added bug A defect in the library needs triage An issue that has not yet been triaged labels Sep 21, 2022
joeljfischer added a commit that referenced this issue Sep 21, 2022
* If the alert icon image wasn't successfully uploaded, don't show it (fixes a case where an overwriting image could fail and the old image could show)
* Fix tests
@joeljfischer joeljfischer added manager-screen Relating to the manager layer - screen managers and removed needs triage An issue that has not yet been triaged labels Sep 22, 2022
@joeljfischer joeljfischer self-assigned this Sep 22, 2022
@joeljfischer joeljfischer linked a pull request Sep 22, 2022 that will close this issue
4 tasks
@joeljfischer joeljfischer mentioned this issue Sep 23, 2022
1 task
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug A defect in the library manager-screen Relating to the manager layer - screen managers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant