if articlepager is also available, notify it about updated item count after lazy load

This commit is contained in:
Andrew Dolgov 2014-10-20 21:48:18 +04:00
parent f6deb68c76
commit 31440437fe
4 changed files with 14 additions and 5 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fox.ttrss"
android:versionCode="244"
android:versionName="1.45" >
android:versionCode="245"
android:versionName="1.46" >
<uses-sdk
android:minSdkVersion="8"

View File

@ -161,7 +161,7 @@ public class ArticlePager extends Fragment {
@Override
protected void onPostExecute(JsonElement result) {
if (isDetached()) return;
m_activity.setProgressBarVisibility(false);
//m_activity.m_pullToRefreshAttacher.setRefreshComplete();
@ -255,6 +255,8 @@ public class ArticlePager extends Fragment {
}
};
Log.d(TAG, "[AP] request more headlines...");
req.execute(map);
}

View File

@ -237,7 +237,12 @@ public class HeadlinesActivity extends OnlineActivity implements HeadlinesEventL
@Override
public void onHeadlinesLoaded(boolean appended) {
HeadlinesFragment hf = (HeadlinesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
ArticlePager ap = (ArticlePager) getSupportFragmentManager().findFragmentByTag(FRAG_ARTICLE);
if (ap != null) {
ap.notifyUpdated();
}
if (hf != null) {
Article article = hf.getActiveArticle();

View File

@ -554,7 +554,9 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
}
};
Log.d(TAG, "[HP] request more headlines...");
req.execute(map);
}
}