mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Add constructor to ExistingFileAsync and call it in ShareActivity
This commit is contained in:
parent
9afb1da6fa
commit
ce3abcd727
2 changed files with 8 additions and 3 deletions
|
|
@ -19,11 +19,11 @@ public class ExistingFileAsync extends AsyncTask<Void, Void, ArrayList<String>>
|
||||||
|
|
||||||
private final static int SEARCH_CATS_LIMIT = 25;
|
private final static int SEARCH_CATS_LIMIT = 25;
|
||||||
private static final String TAG = fr.free.nrw.commons.upload.ExistingFileAsync.class.getName();
|
private static final String TAG = fr.free.nrw.commons.upload.ExistingFileAsync.class.getName();
|
||||||
private String title;
|
private String fileSHA1;
|
||||||
|
|
||||||
public ExistingFileAsync(String title) {
|
public ExistingFileAsync(String fileSHA1) {
|
||||||
super();
|
super();
|
||||||
this.title = title;
|
this.fileSHA1 = fileSHA1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -250,6 +250,11 @@ public class ShareActivity
|
||||||
|
|
||||||
//FIXME: Replace hardcoded string with call to Commons API instead (use TitleCategories.java as template)
|
//FIXME: Replace hardcoded string with call to Commons API instead (use TitleCategories.java as template)
|
||||||
// https://commons.wikimedia.org/w/api.php?action=query&list=allimages&aisha1=801957214aba50cb63bb6eb1b0effa50188900ba
|
// https://commons.wikimedia.org/w/api.php?action=query&list=allimages&aisha1=801957214aba50cb63bb6eb1b0effa50188900ba
|
||||||
|
ExistingFileAsync fileAsyncTask = new ExistingFileAsync(fileSHA1);
|
||||||
|
fileAsyncTask.execute(url1, url2, url3);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String debugSHA1 = "801957214aba50cb63bb6eb1b0effa50188900ba";
|
String debugSHA1 = "801957214aba50cb63bb6eb1b0effa50188900ba";
|
||||||
|
|
||||||
boolean fileSHA1Found = fileSHA1.equals(debugSHA1);
|
boolean fileSHA1Found = fileSHA1.equals(debugSHA1);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue