Fix review
This commit is contained in:
parent
7944fc3a2b
commit
144f812f40
2 changed files with 2 additions and 6 deletions
|
@ -182,6 +182,7 @@ public class ExploreRvAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addDownloadUpdateCard(TravelDownloadUpdateCard card) {
|
public void addDownloadUpdateCard(TravelDownloadUpdateCard card) {
|
||||||
|
removeDownloadUpdateCard();
|
||||||
this.downloadCard = card;
|
this.downloadCard = card;
|
||||||
if (addItem(getDownloadUpdateCardPosition(), card)) {
|
if (addItem(getDownloadUpdateCardPosition(), card)) {
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
|
|
|
@ -61,7 +61,6 @@ public class WikivoyageExploreActivity extends TabActivity implements DownloadEv
|
||||||
protected List<WeakReference<Fragment>> fragments = new ArrayList<>();
|
protected List<WeakReference<Fragment>> fragments = new ArrayList<>();
|
||||||
|
|
||||||
private LockableViewPager viewPager;
|
private LockableViewPager viewPager;
|
||||||
private boolean finishDownloading = false;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
@ -314,12 +313,10 @@ public class WikivoyageExploreActivity extends TabActivity implements DownloadEv
|
||||||
|
|
||||||
public void populateData() {
|
public void populateData() {
|
||||||
switchProgressBarVisibility(true);
|
switchProgressBarVisibility(true);
|
||||||
finishDownloading = false;
|
|
||||||
new LoadWikivoyageData(this).execute();
|
new LoadWikivoyageData(this).execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onDataLoaded() {
|
private void onDataLoaded() {
|
||||||
finishDownloading = true;
|
|
||||||
switchProgressBarVisibility(false);
|
switchProgressBarVisibility(false);
|
||||||
updateSearchBarVisibility();
|
updateSearchBarVisibility();
|
||||||
updateFragments();
|
updateFragments();
|
||||||
|
@ -356,9 +353,7 @@ public class WikivoyageExploreActivity extends TabActivity implements DownloadEv
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onTabFragmentResume(Fragment fragment) {
|
public void onTabFragmentResume(Fragment fragment) {
|
||||||
if(finishDownloading) {
|
updateFragments();
|
||||||
updateFragments();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue