Try to fix updates tts files issue.
This commit is contained in:
parent
434b876965
commit
9a342d2e72
4 changed files with 20 additions and 3 deletions
|
@ -551,7 +551,17 @@ public class DownloadIndexesThread {
|
|||
!date.equals(indexactivateddate) &&
|
||||
!date.equals(indexfilesdate) &&
|
||||
indexActivatedFileNames.containsKey(sfName)) {
|
||||
itemsToUpdate.add(item);
|
||||
if (item.getType() == DownloadActivityType.NORMAL_FILE){
|
||||
itemsToUpdate.add(item);
|
||||
} else {
|
||||
long itemSize = item.getSize();
|
||||
File file = new File(((DownloadOsmandIndexesHelper.AssetIndexItem) item).getDestFile());
|
||||
long oldItemSize = file.length();
|
||||
if (itemSize != oldItemSize){
|
||||
itemsToUpdate.add(item);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (uiActivity != null){
|
||||
|
|
|
@ -165,6 +165,10 @@ public class DownloadOsmandIndexesHelper {
|
|||
res.add(new DownloadEntry(this, assetName, destFile, dateModified));
|
||||
return res;
|
||||
}
|
||||
|
||||
public String getDestFile(){
|
||||
return destFile;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -57,6 +57,9 @@ public class IndexItem implements Comparable<IndexItem> {
|
|||
return timestamp;
|
||||
}
|
||||
|
||||
public long getSize(){
|
||||
return containerSize;
|
||||
}
|
||||
|
||||
public String getSizeDescription(Context ctx) {
|
||||
return size + " MB";
|
||||
|
|
Loading…
Reference in a new issue