Update download card
This commit is contained in:
parent
1b63d7c3c9
commit
ca38b304f4
1 changed files with 6 additions and 5 deletions
|
@ -110,7 +110,9 @@ public class ExploreTabFragment extends BaseOsmAndFragment implements DownloadIn
|
||||||
downloadIndexesRequested = false;
|
downloadIndexesRequested = false;
|
||||||
indexItem = getMyApplication().getDownloadThread().getIndexes()
|
indexItem = getMyApplication().getDownloadThread().getIndexes()
|
||||||
.getWikivoyageItem(getWikivoyageFileName());
|
.getWikivoyageItem(getWikivoyageFileName());
|
||||||
addDownloadUpdateCard(false);
|
if(downloadUpdateCard == null) {
|
||||||
|
addDownloadUpdateCard(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +125,6 @@ public class ExploreTabFragment extends BaseOsmAndFragment implements DownloadIn
|
||||||
&& indexItem != null
|
&& indexItem != null
|
||||||
&& current == indexItem
|
&& current == indexItem
|
||||||
&& (!current.isDownloaded() || current.isOutdated())) {
|
&& (!current.isDownloaded() || current.isOutdated())) {
|
||||||
addDownloadUpdateCard(true);
|
|
||||||
downloadUpdateCard.setProgress(downloadThread.getCurrentDownloadingItemProgress());
|
downloadUpdateCard.setProgress(downloadThread.getCurrentDownloadingItemProgress());
|
||||||
adapter.updateDownloadUpdateCard();
|
adapter.updateDownloadUpdateCard();
|
||||||
}
|
}
|
||||||
|
@ -139,9 +140,9 @@ public class ExploreTabFragment extends BaseOsmAndFragment implements DownloadIn
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addDownloadUpdateCard(boolean loadingInProgress) {
|
private void addDownloadUpdateCard(boolean loadingInProgress) {
|
||||||
if(downloadUpdateCard != null) {
|
// if(downloadUpdateCard != null) {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
final OsmandApplication app = getMyApplication();
|
final OsmandApplication app = getMyApplication();
|
||||||
|
|
||||||
boolean outdated = indexItem != null && indexItem.isOutdated();
|
boolean outdated = indexItem != null && indexItem.isOutdated();
|
||||||
|
|
Loading…
Reference in a new issue