mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Rearranging code
This commit is contained in:
parent
bdd53f2f2a
commit
bfcb7fb6f2
1 changed files with 19 additions and 19 deletions
|
|
@ -101,6 +101,25 @@ public class ShareActivity
|
|||
}
|
||||
}
|
||||
|
||||
private void uploadBegins() {
|
||||
|
||||
Toast startingToast = Toast.makeText(getApplicationContext(), R.string.uploading_started, Toast.LENGTH_LONG);
|
||||
startingToast.show();
|
||||
|
||||
if (cacheFound == false) {
|
||||
//Has to be called after apiCall.request()
|
||||
app.cacheData.cacheCategory();
|
||||
Log.d(TAG, "Cache the categories found");
|
||||
}
|
||||
|
||||
uploadController.startUpload(title, mediaUri, description, mimeType, source, new UploadController.ContributionUploadProgress() {
|
||||
public void onUploadStarted(Contribution contribution) {
|
||||
ShareActivity.this.contribution = contribution;
|
||||
showPostUpload();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void showPostUpload() {
|
||||
if(categorizationFragment == null) {
|
||||
categorizationFragment = new CategorizationFragment();
|
||||
|
|
@ -277,25 +296,6 @@ public class ShareActivity
|
|||
}
|
||||
}
|
||||
|
||||
private void uploadBegins() {
|
||||
|
||||
Toast startingToast = Toast.makeText(getApplicationContext(), R.string.uploading_started, Toast.LENGTH_LONG);
|
||||
startingToast.show();
|
||||
|
||||
if (cacheFound == false) {
|
||||
//Has to be called after apiCall.request()
|
||||
app.cacheData.cacheCategory();
|
||||
Log.d(TAG, "Cache the categories found");
|
||||
}
|
||||
|
||||
uploadController.startUpload(title, mediaUri, description, mimeType, source, new UploadController.ContributionUploadProgress() {
|
||||
public void onUploadStarted(Contribution contribution) {
|
||||
ShareActivity.this.contribution = contribution;
|
||||
showPostUpload();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode,
|
||||
String permissions[], int[] grantResults) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue