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

Add Background Image Sync on App Launch and Refresh Button #6154

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

Sujal-Gupta-SG
Copy link
Contributor

@Sujal-Gupta-SG Sujal-Gupta-SG commented Jan 23, 2025

Description

Fixes #6084

What changes did you make and why?

  • Background Image Sync: On app launch, the background process atleast one time fetches new contribution

  • Refresh Button: A refresh button has been added to the app's action bar. When clicked, it starts a rotation animation and triggers the function and fetches new contribution.

Sujal-Gupta-SG and others added 9 commits January 4, 2025 02:09
…s loading spinwheel) we check whether the server's last image is the app's last image.

If not, refresh.
New "refresh" button having the same effect as swipe down.
# Conflicts:
#	app/src/main/java/fr/free/nrw/commons/contributions/ContributionsListPresenter.java
#	app/src/main/java/fr/free/nrw/commons/contributions/ContributionsRemoteDataSource.kt
@nicolas-raoul
Copy link
Member

nicolas-raoul commented Jan 25, 2025

Does the "refresh" button have the same effect as swipe down?

@Sujal-Gupta-SG
Copy link
Contributor Author

Sujal-Gupta-SG commented Jan 25, 2025

Does the "refresh" button have the same effect as swipe down?

No, the "refresh" button checks for new/latest contributions, while swipe down refreshes the current contributions list and fetches the latest contributions.

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.

The "refresh" button does not find the contribution I uploaded 3 hours ago:

screen-20250126-142600.mp4

@Sujal-Gupta-SG Sujal-Gupta-SG marked this pull request as draft January 26, 2025 08:02
@Sujal-Gupta-SG
Copy link
Contributor Author

@nicolas-raoul when i try to fetch new contribution always returns a random contribution identifier, making it unreliable for detecting new contributions. I modified it to ensure a request is sent at least once in the background and always fetches new contributions on refresh button.

@Sujal-Gupta-SG Sujal-Gupta-SG marked this pull request as ready for review January 26, 2025 15:36
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.

Still experiencing the same issue with your latest commit:
https://github.com/user-attachments/assets/29340464-9812-4932-af74-2e04a2543783

@Sujal-Gupta-SG Sujal-Gupta-SG marked this pull request as draft January 27, 2025 12:29
@Sujal-Gupta-SG Sujal-Gupta-SG marked this pull request as ready for review January 27, 2025 18:41
@Sujal-Gupta-SG
Copy link
Contributor Author

@nicolas-raoul Now i think it will work great let me know if you again got an error

Record_2025-01-28-00-09-21.mp4

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.

List of uploaded photographs not refreshing when uploaded via desktop/laptop
2 participants