Update downloads
This commit is contained in:
parent
869a5569a0
commit
5d412c8f94
3 changed files with 7 additions and 5 deletions
|
@ -85,8 +85,6 @@ public class OsmAndAppCustomization {
|
|||
|
||||
}
|
||||
|
||||
public void updatedLoadedFiles(Map<String, String> indexFileNames, Map<String, String> indexActivatedFileNames) {
|
||||
}
|
||||
|
||||
public List<String> onIndexingFiles(IProgress progress, Map<String, String> indexFileNames) {
|
||||
return Collections.emptyList();
|
||||
|
|
|
@ -44,7 +44,6 @@ public class DownloadResources extends DownloadResourceGroup {
|
|||
listWithAlternatives(dateFormat, app.getAppPath(""), IndexConstants.EXTRA_EXT, indexActivatedFileNames);
|
||||
Map<String, String> indexFileNames = app.getResourceManager().getIndexFileNames();
|
||||
listWithAlternatives(dateFormat, app.getAppPath(""), IndexConstants.EXTRA_EXT, indexFileNames);
|
||||
app.getAppCustomization().updatedLoadedFiles(indexFileNames, indexActivatedFileNames);
|
||||
listWithAlternatives(dateFormat, app.getAppPath(IndexConstants.TILES_INDEX_DIR), IndexConstants.SQLITE_EXT,
|
||||
indexFileNames);
|
||||
app.getResourceManager().getBackupIndexes(indexFileNames);
|
||||
|
@ -124,6 +123,7 @@ public class DownloadResources extends DownloadResourceGroup {
|
|||
|
||||
|
||||
protected void updateFilesToUpdate() {
|
||||
initAlreadyLoadedFiles();
|
||||
List<IndexItem> stillUpdate = new ArrayList<IndexItem>();
|
||||
for (IndexItem item : itemsToUpdate) {
|
||||
String sfName = item.getTargetFileName();
|
||||
|
|
|
@ -269,6 +269,11 @@ public class DownloadResourceGroupFragment extends DialogFragment implements Dow
|
|||
this.ctx = ctx;
|
||||
textView = (TextView) v.findViewById(R.id.title);
|
||||
}
|
||||
|
||||
private boolean isParentWorld(DownloadResourceGroup group) {
|
||||
return group.getParentGroup() == null
|
||||
|| group.getParentGroup().getType() == DownloadResourceGroupType.WORLD;
|
||||
}
|
||||
|
||||
private Drawable getIconForGroup(DownloadResourceGroup group) {
|
||||
Drawable iconLeft;
|
||||
|
@ -277,8 +282,7 @@ public class DownloadResourceGroupFragment extends DialogFragment implements Dow
|
|||
iconLeft = ctx.getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_volume_up);
|
||||
} else {
|
||||
IconsCache cache = ctx.getMyApplication().getIconsCache();
|
||||
if (group.getParentGroup() == null
|
||||
|| group.getParentGroup().getType() == DownloadResourceGroupType.WORLD) {
|
||||
if (isParentWorld(group) || isParentWorld(group.getParentGroup())) {
|
||||
iconLeft = cache.getContentIcon(R.drawable.ic_world_globe_dark);
|
||||
} else {
|
||||
DownloadResourceGroup ggr = group
|
||||
|
|
Loading…
Reference in a new issue