mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Do not crash when trying to upload multiple files
Change-Id: Ibe4fe6b7518f9634fc0d9ce8bda9ccbd9ee9c30d GitHub: https://github.com/wikimedia/apps-android-commons/pull/30
This commit is contained in:
parent
d5c90801c5
commit
0c381ed928
1 changed files with 7 additions and 0 deletions
|
|
@ -56,6 +56,13 @@ public class StartUploadTask extends AsyncTask<Void, Void, Contribution> {
|
|||
this.uploadService = uploadService;
|
||||
this.contribution = contribution;
|
||||
|
||||
// Set things that have not been set!
|
||||
if(contribution.getLicense() == null) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
String license = prefs.getString(Prefs.DEFAULT_LICENSE, Prefs.Licenses.CC_BY_SA);
|
||||
contribution.setLicense(license);
|
||||
}
|
||||
|
||||
app = (CommonsApplication)context.getApplicationContext();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue