From f4cef8da1b83376bbb693a27dc846bb9f6aeb070 Mon Sep 17 00:00:00 2001 From: misaochan Date: Wed, 9 May 2018 02:29:52 +1000 Subject: [PATCH] Add TODOs --- .../nrw/commons/upload/ShareActivity.java | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/fr/free/nrw/commons/upload/ShareActivity.java b/app/src/main/java/fr/free/nrw/commons/upload/ShareActivity.java index 1a73c6f43..ffc965d90 100644 --- a/app/src/main/java/fr/free/nrw/commons/upload/ShareActivity.java +++ b/app/src/main/java/fr/free/nrw/commons/upload/ShareActivity.java @@ -216,6 +216,10 @@ public class ShareActivity .commit(); } + /** + * Send categories to modifications queue after they are selected + * @param categories categories selected + */ @Override public void onCategoriesSave(List categories) { if (categories.size() > 0) { @@ -253,10 +257,6 @@ public class ShareActivity finish(); } - protected boolean isNearbyUpload() { - return isNearbyUpload; - } - @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -309,8 +309,6 @@ public class ShareActivity } }); - - zoomInButton = (FloatingActionButton) findViewById(R.id.media_upload_zoom_in); try { zoomInButton.setOnClickListener(new View.OnClickListener() { @@ -345,6 +343,7 @@ public class ShareActivity } } + //TODO: We should only use snackbar for location permissions, since storage permissions are MANDATORY // Check storage permissions if marshmallow or newer if (useNewPermissions && (!storagePermitted || !locationPermitted)) { if (!storagePermitted && !locationPermitted) { @@ -404,7 +403,8 @@ public class ShareActivity } }); } - /* + + /** * Function to display the zoom and map FAB */ private void showFABMenu(){ @@ -419,8 +419,8 @@ public class ShareActivity zoomInButton.animate().translationY(-getResources().getDimension(R.dimen.first_fab)); } - /* - * function to close the zoom and map FAB + /** + * Function to close the zoom and map FAB */ private void closeFABMenu(){ isFABOpen=false; @@ -429,7 +429,6 @@ public class ShareActivity zoomInButton.animate().translationY(0).setListener(new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animator) { - } @Override @@ -438,21 +437,25 @@ public class ShareActivity maps_fragment.setVisibility(View.GONE); zoomInButton.setVisibility(View.GONE); } - } @Override public void onAnimationCancel(Animator animator) { - } @Override public void onAnimationRepeat(Animator animator) { - } }); } + /** + * Checks if upload was initiated via Nearby + * @return true if upload was initiated via Nearby + */ + protected boolean isNearbyUpload() { + return isNearbyUpload; + } @Override public void onRequestPermissionsResult(int requestCode,