Skip to content

Commit

Permalink
Actually use PROGRESS_DOWNLOAD_TASKS
Browse files Browse the repository at this point in the history
Progress modal for tasks was using the wrong constant.

Probably fixes
#2388
  • Loading branch information
simonpoole committed Aug 29, 2023
1 parent 4c07e6d commit 1f4958d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/de/blau/android/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -1309,13 +1309,13 @@ private void loadGPXFile(@NonNull final Uri uri) {
*/
public void downLoadBugs(BoundingBox bbox) {
if (isConnected()) { // don't try if we are not connected
Progress.showDialog(this, Progress.PROGRESS_DOWNLOAD);
Progress.showDialog(this, Progress.PROGRESS_DOWNLOAD_TASKS);
TransferTasks.downloadBox(this, prefs.getServer(), bbox, true, TransferTasks.MAX_PER_REQUEST, () -> {
de.blau.android.layer.tasks.MapOverlay taskLayer = map.getTaskLayer();
if (taskLayer != null) {
taskLayer.setVisible(true);
}
Progress.dismissDialog(Main.this, Progress.PROGRESS_DOWNLOAD);
Progress.dismissDialog(Main.this, Progress.PROGRESS_DOWNLOAD_TASKS);
getMap().invalidate();
});
}
Expand Down Expand Up @@ -3123,15 +3123,15 @@ public void onLowMemory() {
* @param add if true merge the data with the current contents, if false replace
*/
public void performCurrentViewHttpLoad(boolean add) {
if (map.getTaskLayer() != null) { // always adds bugs for now
downLoadBugs(map.getViewBox().copy());
}
int nodeCount = App.getDelegator().getCurrentStorage().getNodeCount();
if (add && nodeCount >= prefs.getDataWarnLimit()) {
TooMuchData.showDialog(this, nodeCount);
return;
}
App.getLogic().downloadBox(this, map.getViewBox().copy(), add, null);
if (map.getTaskLayer() != null) { // always adds bugs for now
downLoadBugs(map.getViewBox().copy());
}
}

/**
Expand Down

0 comments on commit 1f4958d

Please sign in to comment.