Preparing for caching

This commit is contained in:
misaochan 2016-01-05 18:21:21 +13:00
parent 7ce715c1da
commit 09505c0c17
2 changed files with 3 additions and 3 deletions

View file

@ -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);

View file

@ -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);
} }