mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 13:53:54 +01:00
Fix uploads getting stuck (#2309)
* Fix uploads getting stuck * Fix test * Use single instance of Gson across the app * More logs to help debug upload failure * Add request identifier * wip * Fix issues with image quality check dialogs
This commit is contained in:
parent
07f9af19f5
commit
532ab8aeae
16 changed files with 85 additions and 91 deletions
|
|
@ -12,21 +12,13 @@ import static fr.free.nrw.commons.contributions.ContributionController.NEARBY_GA
|
|||
|
||||
public class IntentUtils {
|
||||
|
||||
/**
|
||||
* Check if the intent should be handled by nearby list or map fragment
|
||||
*/
|
||||
public static boolean shouldNearbyHandle(int requestCode, int resultCode, Intent data) {
|
||||
return resultCode == Activity.RESULT_OK
|
||||
&& (requestCode == NEARBY_CAMERA_UPLOAD_REQUEST_CODE || requestCode == NEARBY_GALLERY_UPLOAD_REQUEST_CODE)
|
||||
&& data != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the intent should be handled by contributions list fragment
|
||||
*/
|
||||
public static boolean shouldContributionsListHandle(int requestCode, int resultCode, Intent data) {
|
||||
public static boolean shouldContributionsHandle(int requestCode, int resultCode, Intent data) {
|
||||
return resultCode == Activity.RESULT_OK
|
||||
&& (requestCode == GALLERY_UPLOAD_REQUEST_CODE || requestCode == CAMERA_UPLOAD_REQUEST_CODE)
|
||||
&& (requestCode == GALLERY_UPLOAD_REQUEST_CODE || requestCode == CAMERA_UPLOAD_REQUEST_CODE
|
||||
|| requestCode == NEARBY_CAMERA_UPLOAD_REQUEST_CODE || requestCode == NEARBY_GALLERY_UPLOAD_REQUEST_CODE)
|
||||
&& data != null;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue