apps-android-commons: [Bug]: Set Wallpaper Not Working Correctly

Summary

The Set Wallpaper feature in the contributions page does not inform the user that it has failed to set wallpaper. Also, I am unable to abort this dialog.

The issue is not that set wallpaper is failing to set the Image as wallpaper but that it is NOT Informing the user that it has failed and dialog is still appearing on the screen which the user cannot close.

Also, we should make the “set as wallpaper” a background task that does not block the UI Thread as sometimes this can take long ( it is pretty similar to download )

Steps to reproduce

  1. Open the app
  2. Open any Contribution in Explore or your contribution
  3. Click “Set as Wallpaper”

Expected behaviour

Sets the wallpaper or if it fails then the dialog ends and the user is informed

Actual behaviour

set wallpaper keeps on going

Device name

Xiaomi 11 Lite NE

Android version

Android 13

Commons app version

4.2.1-debug-main

Device logs

HTTP FAILED: java.io.IOException: Canceled
2024-02-16 20:52:02.709 16877-17104 OkHttp                  fr.free.nrw.commons.beta             V  --> GET https://upload.wikimedia.beta.wmflabs.org/wikipedia/commons/thumb/6/6f/Sea_View.jpg/640px-Sea_View.jpg
2024-02-16 20:52:02.709 16877-17104 OkHttp                  fr.free.nrw.commons.beta             V  Cache-Control: no-store
2024-02-16 20:52:02.709 16877-17104 OkHttp                  fr.free.nrw.commons.beta             V  --> END GET

Screen-shots

https://github.com/commons-app/apps-android-commons/assets/126143257/b7ce8dfb-9482-48b7-ae7c-004cac5ca137

Would you like to work on the issue?

Yes

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (14 by maintainers)

Most upvoted comments

If you don’t mind can I work on this as I was digging it up recently and found the exact solution which is causing the bug and fix? Can I work on it if you wish or can we collaborate?

I have already worked on it and presented a solution, I was waiting for mentors approval to make the PR and take inputs for changes

Sure, no problem 😉

Well, I just faced the same with betaDebug flavor😅 But yeah we need to handle the failure 😃

Are you working on it?

@ShashwatKedia no that’s not the issue I am trying to report here, if you read the summary again I have mentioned that failing is not the problem, but dialog still appearing after failing is.