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

List of uploaded photographs not refreshing when uploaded via desktop/laptop #6084

Open
Suyashdwivedi opened this issue Dec 26, 2024 · 14 comments · May be fixed by #6154
Open

List of uploaded photographs not refreshing when uploaded via desktop/laptop #6084

Suyashdwivedi opened this issue Dec 26, 2024 · 14 comments · May be fixed by #6154
Assignees
Labels

Comments

@Suyashdwivedi
Copy link

Summary

The Commons Mobile Application fails to refresh the list of uploaded photographs when new images are uploaded via desktop or laptop.

Steps to reproduce

  1. Upload a new photograph using a desktop or laptop.
  2. Open the Commons Mobile Application on my Android device.
  3. Navigate to the list of uploaded photographs.
  4. Observe that the newly uploaded photograph is not visible in the list.
  5. Log out of the app and re-login.
  6. Navigate to the list of uploaded photographs again.
  7. Observe that the newly uploaded photograph is now visible in the list.

Expected behaviour

The list of uploaded photographs should refresh automatically to reflect new uploads from any device, including desktop and laptop.

Actual behaviour

Device: Android mobile

Device name

Oppo F11

Android version

Android 9.0

Commons app version

5.1.0

Device logs

No response

Screen-shots

No response

Would you like to work on the issue?

None

@nicolas-raoul
Copy link
Member

Would you mind trying when building the latest main branch?

@parneet-guraya
Copy link
Contributor

Actually you don't need to logout, just clear the app from memory and open it again, it will trigger the refresh and show you, but we recently added pull to refresh too. I'm not entirely sure what strategy to use to automatically refresh. Maybe trigger it every n time & also every time you visit the screen. But we can have it for sure.

document_6302998381010621591.mp4

Also pull to refresh works.

document_6302998381010621590.mp4

@Sujal-Gupta-SG
Copy link
Contributor

@nicolas-raoul
I think we can call the refresh function or method after adding new post everytime ,maybe this situation get satisfied , we donn't need to clear the cache or clear the app from the memory, it will automatically get triggered when the new post get added .
@nicolas-raoul If you say i want to work on this issue

@Suyashdwivedi
Copy link
Author

Suyashdwivedi commented Jan 2, 2025 via email

@Sujal-Gupta-SG
Copy link
Contributor

i want to work on this issue ,can you assign this issue to me ,so that i can make the changes as soon as possible

@nicolas-raoul
Copy link
Member

I don't think the Commons website can "push" to our app a signal that a new file has been uploaded.
We can "poll" from time to time, and load the new files if there are any, ideally without refreshing the ones that are shown already.

For this issue, the most important is to keep network usage and Commons server resources usage very low.

Sujal-Gupta-SG added a commit to Sujal-Gupta-SG/apps-android-commons that referenced this issue Jan 3, 2025
Sujal-Gupta-SG added a commit to Sujal-Gupta-SG/apps-android-commons that referenced this issue Jan 3, 2025
Sujal-Gupta-SG added a commit to Sujal-Gupta-SG/apps-android-commons that referenced this issue Jan 3, 2025
Sujal-Gupta-SG added a commit to Sujal-Gupta-SG/apps-android-commons that referenced this issue Jan 4, 2025
@nicolas-raoul
Copy link
Member

How about this:

  • When opening the app, in the background (without any UI impact such as 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.

@neeldoshii
Copy link
Contributor

When opening the app, in the background (without any UI impact such as loading spinwheel) we check whether the server's last image is the app's last image.
If not, refresh.

Whenever an app is reopened, I believe new contribution are loaded since it fetches the data and new data is updated.

As per this comment #6084 (comment) the newly data is loaded successfully after loading the app again.

wdyt?

@nicolas-raoul
Copy link
Member

Whenever an app is reopened, I believe new contribution are loaded

Would you mind actually trying?

  1. Stop the app.
  2. Upload a picture via the website.
  3. Open the app.

@nicolas-raoul
Copy link
Member

Note: I meant trying on the main branch.

@Sujal-Gupta-SG
Copy link
Contributor

Sujal-Gupta-SG commented Jan 11, 2025

Note: I meant trying on the main branch.

How about this:

  • When opening the app, in the background (without any UI impact such as 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.

So what should I do now:
should I make some changes to my pull request according to your idea or should I wait for new idea

@Sujal-Gupta-SG
Copy link
Contributor

Sujal-Gupta-SG commented Jan 13, 2025

Note: I meant trying on the main branch.

How about this:

  • When opening the app, in the background (without any UI impact such as 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.

So what should I do now: should I make some changes to my pull request according to your idea or should I wait for new idea

Hey @nicolas-raoul
Give a reply ,So that I can resolve this issue as soon as possible

@nicolas-raoul
Copy link
Member

Sorry for the delay, I would suggest a new pull request.

@Suyashdwivedi
Copy link
Author

Suyashdwivedi commented Jan 22, 2025 via email

Sujal-Gupta-SG added a commit to Sujal-Gupta-SG/apps-android-commons that referenced this issue Jan 23, 2025
Sujal-Gupta-SG added a commit to Sujal-Gupta-SG/apps-android-commons that referenced this issue Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment