Fixed merge bugs

This commit is contained in:
Denis 2014-11-28 11:22:09 +02:00
parent ddfea0fc67
commit 4021f81d3f

View file

@ -2,16 +2,20 @@ package net.osmand.plus.activities;
import java.io.File;
import java.lang.ref.WeakReference;
import java.text.MessageFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Random;
import android.support.v4.app.Fragment;
import net.osmand.access.AccessibleAlertBuilder;
import net.osmand.plus.OsmAndAppCustomization;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.Version;
import net.osmand.plus.base.BasicProgressAsyncTask;
import net.osmand.plus.dashboard.DashFavoritesFragment;
import net.osmand.plus.dashboard.DashMapFragment;
import net.osmand.plus.dashboard.DashPluginsFragment;
@ -19,6 +23,7 @@ import net.osmand.plus.dashboard.DashSearchFragment;
import net.osmand.plus.dashboard.DashUpdatesFragment;
import net.osmand.plus.download.BaseDownloadActivity;
import net.osmand.plus.download.DownloadActivity;
import net.osmand.plus.download.IndexItem;
import net.osmand.plus.render.MapRenderRepositories;
import net.osmand.plus.sherpafy.TourViewActivity;
import android.app.Activity;
@ -460,4 +465,29 @@ public class DashboardActivity extends BaseDownloadActivity {
textVersionView.setText(content);
textVersionView.setMovementMethod(LinkMovementMethod.getInstance());
}
@Override
public void updateProgress(boolean updateOnlyProgress) {
BasicProgressAsyncTask<?, ?, ?> basicProgressAsyncTask = BaseDownloadActivity.downloadListIndexThread.getCurrentRunningTask();
for(WeakReference<Fragment> ref : fragList) {
Fragment f = ref.get();
if(f instanceof DashUpdatesFragment) {
if(!f.isDetached()) {
((DashUpdatesFragment) f).updateProgress(basicProgressAsyncTask, updateOnlyProgress);
}
}
}
}
@Override
public void updateDownloadList(List<IndexItem> list){
for(WeakReference<Fragment> ref : fragList) {
Fragment f = ref.get();
if(f instanceof DashUpdatesFragment) {
if(!f.isDetached()) {
((DashUpdatesFragment) f).updatedDownloadsList(list);
}
}
}
}
}