Redownload basemap
This commit is contained in:
parent
868f61a98c
commit
d7c69997d6
1 changed files with 11 additions and 6 deletions
|
@ -375,13 +375,18 @@ public class DownloadIndexesThread {
|
|||
if (indexFiles != null && uiActivity != null) {
|
||||
boolean basemapExists = uiActivity.getMyApplication().getResourceManager().containsBasemap();
|
||||
IndexItem basemap = indexFiles.getBasemap();
|
||||
if (!basemapExists && basemap != null) {
|
||||
List<DownloadEntry> downloadEntry = basemap.createDownloadEntry(uiActivity.getClientContext(),
|
||||
uiActivity.getType(), new ArrayList<DownloadEntry>());
|
||||
if (basemap != null ) {
|
||||
String dt = uiActivity.getMyApplication().getResourceManager().getIndexFileNames().get(basemap.getTargetFileName());
|
||||
if (!basemapExists || !Algorithms.objectEquals(dt, basemap.getDate())) {
|
||||
List<DownloadEntry> downloadEntry = basemap
|
||||
.createDownloadEntry(uiActivity.getClientContext(), uiActivity.getType(),
|
||||
new ArrayList<DownloadEntry>());
|
||||
uiActivity.getEntriesToDownload().put(basemap, downloadEntry);
|
||||
AccessibleToast.makeText(uiActivity, R.string.basemap_was_selected_to_download, Toast.LENGTH_LONG).show();
|
||||
AccessibleToast.makeText(uiActivity, R.string.basemap_was_selected_to_download,
|
||||
Toast.LENGTH_LONG).show();
|
||||
uiActivity.findViewById(R.id.DownloadButton).setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
if (indexFiles.isIncreasedMapVersion()) {
|
||||
showWarnDialog();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue