Small fix - map region context menu

This commit is contained in:
Alexey Kulish 2016-01-30 18:37:12 +03:00
parent a14fd90eab
commit cce6f72db8

View file

@ -127,8 +127,10 @@ public class MapDataMenuController extends MenuController {
};
if (!downloadThread.getIndexes().isDownloadedFromInternet) {
if (mapActivity.getMyApplication().getSettings().isInternetConnectionAvailable()) {
downloadThread.runReloadIndexFiles();
}
}
updateData();
}
@ -255,8 +257,10 @@ public class MapDataMenuController extends MenuController {
rightTitleButtonController.visible = indexItem != null && indexItem.isDownloaded();
topRightTitleButtonController.visible = otherIndexItems.size() > 0;
boolean downloadIndexes = !downloadThread.getIndexes().isDownloadedFromInternet
boolean downloadIndexes = getMapActivity().getMyApplication().getSettings().isInternetConnectionAvailable()
&& !downloadThread.getIndexes().isDownloadedFromInternet
&& !downloadThread.getIndexes().downloadFromInternetFailed;
boolean isDownloading = indexItem != null && downloadThread.isDownloading(indexItem);
if (isDownloading) {
titleProgressController.setMapDownloadMode();