@@ -152,8 +152,8 @@ public void uploadActionInitiated(String title, String description) {
152152 this .title = title ;
153153 this .description = description ;
154154
155-
156- if (sessionManager .getCurrentAccount ()!= null ) {
155+
156+ if (sessionManager .getCurrentAccount () != null ) {
157157 if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .M ) {
158158 // Check for Storage permission that is required for upload.
159159 // Do not allow user to proceed without permission, otherwise will crash
@@ -167,11 +167,10 @@ public void uploadActionInitiated(String title, String description) {
167167 uploadBegins ();
168168 }
169169 }
170-
171170 else //Send user to login activity
172171 {
173172 Toast .makeText (this , "You need to login first!" , Toast .LENGTH_SHORT ).show ();
174- Intent loginIntent = new Intent (ShareActivity .this , LoginActivity .class );
173+ Intent loginIntent = new Intent (ShareActivity .this , LoginActivity .class );
175174 startActivity (loginIntent );
176175 }
177176 }
@@ -207,20 +206,13 @@ private void uploadBegins() {
207206 Timber .d ("Cache the categories found" );
208207 }
209208
210- uploadController .startUpload (title , mediaUri , description , mimeType , source , decimalCoords , c -> {
211- ShareActivity .this .contribution = c ;
212- showPostUpload ();
213- });
214-
215- }
216-
209+ uploadController .startUpload (title ,mediaUri ,description ,mimeType ,source ,decimalCoords ,wikiDataEntityId ,c ->
217210
218-
219- uploadController .startUpload (title , mediaUri , description , mimeType , source , decimalCoords , wikiDataEntityId , c -> {
220- ShareActivity .this .contribution = c ;
221- showPostUpload ();
222- });
223- }
211+ {
212+ ShareActivity .this .contribution = c ;
213+ showPostUpload ();
214+ });
215+ }
224216
225217 /**
226218 * Starts CategorizationFragment after uploadBegins.
@@ -679,3 +671,4 @@ public boolean onKeyDown(int keyCode, KeyEvent event) {
679671
680672 }
681673}
674+
0 commit comments