Update download card

This commit is contained in:
Victor Shcherb 2018-04-28 18:03:14 +03:00
parent 1b63d7c3c9
commit ca38b304f4

View file

@ -110,9 +110,11 @@ public class ExploreTabFragment extends BaseOsmAndFragment implements DownloadIn
downloadIndexesRequested = false;
indexItem = getMyApplication().getDownloadThread().getIndexes()
.getWikivoyageItem(getWikivoyageFileName());
if(downloadUpdateCard == null) {
addDownloadUpdateCard(false);
}
}
}
@Override
public void downloadInProgress() {
@ -123,7 +125,6 @@ public class ExploreTabFragment extends BaseOsmAndFragment implements DownloadIn
&& indexItem != null
&& current == indexItem
&& (!current.isDownloaded() || current.isOutdated())) {
addDownloadUpdateCard(true);
downloadUpdateCard.setProgress(downloadThread.getCurrentDownloadingItemProgress());
adapter.updateDownloadUpdateCard();
}
@ -139,9 +140,9 @@ public class ExploreTabFragment extends BaseOsmAndFragment implements DownloadIn
}
private void addDownloadUpdateCard(boolean loadingInProgress) {
if(downloadUpdateCard != null) {
return;
}
// if(downloadUpdateCard != null) {
// return;
// }
final OsmandApplication app = getMyApplication();
boolean outdated = indexItem != null && indexItem.isOutdated();