Fixes
This commit is contained in:
parent
815fdc2df5
commit
c329e2bedf
4 changed files with 11 additions and 7 deletions
|
@ -299,6 +299,7 @@ public class DownloadIndexesThread {
|
|||
currentRunningTask.add(this);
|
||||
super.onPreExecute();
|
||||
this.message = ctx.getString(R.string.downloading_list_indexes);
|
||||
indexes.downloadFromInternetFailed = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -323,10 +324,9 @@ public class DownloadIndexesThread {
|
|||
|
||||
protected void onPostExecute(DownloadResources result) {
|
||||
indexes = result;
|
||||
result.downloadFromInternetFailed = !result.isDownloadedFromInternet;
|
||||
if (result.mapVersionIsIncreased) {
|
||||
showWarnDialog();
|
||||
} else if (!result.isDownloadedFromInternet) {
|
||||
AccessibleToast.makeText(ctx, R.string.list_index_files_was_not_loaded, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
currentRunningTask.remove(this);
|
||||
newDownloadIndexes();
|
||||
|
|
|
@ -19,6 +19,7 @@ import java.util.Map;
|
|||
|
||||
public class DownloadResources extends DownloadResourceGroup {
|
||||
public boolean isDownloadedFromInternet = false;
|
||||
public boolean downloadFromInternetFailed = false;
|
||||
public boolean mapVersionIsIncreased = false;
|
||||
public OsmandApplication app;
|
||||
private Map<String, String> indexFileNames = new LinkedHashMap<>();
|
||||
|
|
|
@ -245,12 +245,10 @@ public class MapDataMenuController extends MenuController {
|
|||
rightTitleButtonController.visible = indexItem != null && indexItem.isDownloaded();
|
||||
topRightTitleButtonController.visible = otherIndexItems.size() > 0;
|
||||
|
||||
boolean hasIndexes = downloadThread.getIndexes().isDownloadedFromInternet;
|
||||
boolean downloadIndexes = !downloadThread.getIndexes().isDownloadedFromInternet
|
||||
&& !downloadThread.getIndexes().downloadFromInternetFailed;
|
||||
boolean isDownloading = indexItem != null && downloadThread.isDownloading(indexItem);
|
||||
if (!hasIndexes) {
|
||||
titleProgressController.setIndexesDownloadMode();
|
||||
titleProgressController.visible = true;
|
||||
} else if (isDownloading) {
|
||||
if (isDownloading) {
|
||||
titleProgressController.setMapDownloadMode();
|
||||
if (downloadThread.getCurrentDownloadingItem() == indexItem) {
|
||||
titleProgressController.indeterminate = false;
|
||||
|
@ -272,6 +270,9 @@ public class MapDataMenuController extends MenuController {
|
|||
titleProgressController.caption = v;
|
||||
}
|
||||
titleProgressController.visible = true;
|
||||
} else if (downloadIndexes) {
|
||||
titleProgressController.setIndexesDownloadMode();
|
||||
titleProgressController.visible = true;
|
||||
} else {
|
||||
titleProgressController.visible = false;
|
||||
}
|
||||
|
|
|
@ -156,11 +156,13 @@ public class MapMultiSelectionMenu extends BaseMenuController {
|
|||
hide();
|
||||
}
|
||||
|
||||
/*
|
||||
for (Map.Entry<Object, IContextMenuProvider> e : selectedObjects.entrySet()) {
|
||||
if (e.getValue() instanceof ContextMenuLayer.IContextMenuProviderSelection) {
|
||||
((ContextMenuLayer.IContextMenuProviderSelection) e.getValue()).setSelectedObject(e.getKey());
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
this.latLon = latLon;
|
||||
createCollection(selectedObjects);
|
||||
|
|
Loading…
Reference in a new issue