Skip to content

Commit 2e0281e

Browse files
Vivek Maskaramisaochan
Vivek Maskara
authored andcommitted
[Dependency: Quadtree] Remove unused code from cache controller (#3163)
1 parent f13a4d4 commit 2e0281e

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

app/src/main/java/fr/free/nrw/commons/caching/CacheController.java

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,14 @@
1616
@Singleton
1717
public class CacheController {
1818

19-
private final GpsCategoryModel gpsCategoryModel;
2019
private final QuadTree<List<String>> quadTree;
2120
private double x, y;
2221
private double xMinus, xPlus, yMinus, yPlus;
2322

2423
private static final int EARTH_RADIUS = 6378137;
2524

2625
@Inject
27-
CacheController(GpsCategoryModel gpsCategoryModel) {
28-
this.gpsCategoryModel = gpsCategoryModel;
26+
CacheController() {
2927
quadTree = new QuadTree<>(-180, -90, +180, +90);
3028
}
3129

@@ -36,17 +34,6 @@ public void setQtPoint(double decLongitude, double decLatitude) {
3634
Timber.d("X (longitude) value: %f, Y (latitude) value: %f", x, y);
3735
}
3836

39-
public void cacheCategory() {
40-
List<String> pointCatList = new ArrayList<>();
41-
if (gpsCategoryModel.getGpsCatExists()) {
42-
pointCatList.addAll(gpsCategoryModel.getCategoryList());
43-
Timber.d("Categories being cached: %s", pointCatList);
44-
} else {
45-
Timber.d("No categories found, so no categories cached");
46-
}
47-
quadTree.set(x, y, pointCatList);
48-
}
49-
5037
public List<String> findCategory() {
5138
Point<List<String>>[] pointsFound;
5239
//Convert decLatitude and decLongitude to a coordinate offset range

0 commit comments

Comments
 (0)