mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Preparing for caching
This commit is contained in:
parent
7ce715c1da
commit
09505c0c17
2 changed files with 3 additions and 3 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
package fr.free.nrw.commons.caching;
|
package fr.free.nrw.commons.caching;
|
||||||
|
|
||||||
import fr.free.nrw.commons.caching.QuadTree;
|
|
||||||
|
|
||||||
public interface Func {
|
public interface Func {
|
||||||
public void call(QuadTree quadTree, Node node);
|
public void call(QuadTree quadTree, Node node);
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,6 @@ public class ShareActivity
|
||||||
|
|
||||||
mediaUriString = mediaUri.toString();
|
mediaUriString = mediaUri.toString();
|
||||||
Log.d("Image", "Uri: " + mediaUriString);
|
Log.d("Image", "Uri: " + mediaUriString);
|
||||||
|
|
||||||
//convert image Uri to file path
|
//convert image Uri to file path
|
||||||
FilePathConverter uriObj = new FilePathConverter(this, mediaUri);
|
FilePathConverter uriObj = new FilePathConverter(this, mediaUri);
|
||||||
String filePath = uriObj.getFilePath();
|
String filePath = uriObj.getFilePath();
|
||||||
|
|
@ -187,8 +186,10 @@ public class ShareActivity
|
||||||
|
|
||||||
if (coords != null) {
|
if (coords != null) {
|
||||||
Log.d("Image", "Coords of image: " + coords);
|
Log.d("Image", "Coords of image: " + coords);
|
||||||
MwVolleyApi apiCall = new MwVolleyApi(this);
|
|
||||||
|
|
||||||
|
//TODO: Insert cache query here, only send API request if no cached categories
|
||||||
|
|
||||||
|
MwVolleyApi apiCall = new MwVolleyApi(this);
|
||||||
//asynchronous calls to MediaWiki Commons API to match image coords with nearby Commons categories
|
//asynchronous calls to MediaWiki Commons API to match image coords with nearby Commons categories
|
||||||
apiCall.request(coords);
|
apiCall.request(coords);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue