Fix refresh
This commit is contained in:
parent
ff5e281db7
commit
8ea049c956
|
@ -442,16 +442,18 @@ public class ProfileFragment extends LoaderFragment implements ScrollableToTop,
|
||||||
if(savedFragment==null && isOwnProfile){
|
if(savedFragment==null && isOwnProfile){
|
||||||
savedFragment=SavedPostsTimelineFragment.newInstance(accountID, account, false);
|
savedFragment=SavedPostsTimelineFragment.newInstance(accountID, account, false);
|
||||||
}
|
}
|
||||||
pager.getAdapter().notifyDataSetChanged();
|
if(!refreshing){
|
||||||
pager.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener(){
|
pager.getAdapter().notifyDataSetChanged();
|
||||||
@Override
|
pager.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener(){
|
||||||
public boolean onPreDraw(){
|
@Override
|
||||||
pager.getViewTreeObserver().removeOnPreDrawListener(this);
|
public boolean onPreDraw(){
|
||||||
pager.setCurrentItem(1, false);
|
pager.getViewTreeObserver().removeOnPreDrawListener(this);
|
||||||
tabbar.selectTab(tabbar.getTabAt(1));
|
pager.setCurrentItem(1, false);
|
||||||
return true;
|
tabbar.selectTab(tabbar.getTabAt(1));
|
||||||
}
|
return true;
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
super.dataLoaded();
|
super.dataLoaded();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue