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

Always show upload icon #6022

Merged

Conversation

parneet-guraya
Copy link
Contributor

Fixes #5847

Based on @bxy379987 's PR #5901 :

PR makes uploadIcon visibility to show at all times.

bxy379987 and others added 4 commits December 11, 2024 07:58
…t adjust the count accordingly,comment the setVisibility method and make pending_upload_icon always visible
…le the original code has been commented out and retained with a note for potential re-use in the future.
Signed-off-by: parneet-guraya <[email protected]>
@parneet-guraya
Copy link
Contributor Author

@nicolas-raoul

from comment in original PR

Testing this branch, the icon is always visible but numbers are flickering and often invisible:
screen-20241115-173301.mp4

This method triggers the fetching & observing (using observable type livedata) of pending & failed uploads. But in either of the case when the fetching happens new instance of livedata is created and observed. Since all this happens in onResume() anything that triggers it (very commons scenarios is navigation to some place else, going to home screen or configuration changes) will lead to new observers that are doing the same thing i.e updating the visibility.

Basically multiple observers are trying to update the visibility since it's not necessary that all observers will get fired at same time, this lead to flickers as you complain. On top of this when pending count changes.

BTW I don't have this many pictures (uploadable) that can give me enough time to reproduce this while they're uploading. Maybe I can try getting some solid color images? Anyways I think this is a separate issue because we changed the visibility of upload icon not the count indicators. It's just that the problem have been hiding when it wasn't visible.

@nicolas-raoul
Copy link
Member

I don't have this many pictures

You can use the beta flavor/server for this. The beta server accepts any test picture. :-)

Whenever you need encyclopedia-worthy pictures to upload to the production server (some issues are applicable only to the production server), please ask me and I can send you a hundred or so.

Copy link
Member

@nicolas-raoul nicolas-raoul left a comment

Choose a reason for hiding this comment

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

Working great, thanks!

@nicolas-raoul nicolas-raoul merged commit 3bfa361 into commons-app:main Dec 11, 2024
1 check passed
sivaraam pushed a commit that referenced this pull request Dec 29, 2024
* fix issue5847 as owner required: make the icon always visible and just adjust the count accordingly,comment the setVisibility method and make pending_upload_icon always visible

* set pending_upload_icon android visible level: visible and tool visible level: gone

* fix issue 5847, The upload icon is now set to always be visible, while the original code has been commented out and retained with a note for potential re-use in the future.

* refactor

Signed-off-by: parneet-guraya <[email protected]>

---------

Signed-off-by: parneet-guraya <[email protected]>
Co-authored-by: bxy379987 <[email protected]>
Co-authored-by: Nicolas Raoul <[email protected]>
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.

[Bug]: Upload icon vanishes at times even when there are uploads pending to complete
3 participants