mirror of
https://github.com/Docile-Alligator/Infinity-For-Reddit.git
synced 2026-02-18 15:35:43 +00:00
Initialize SectionsPagerAdapter before invoking fetchMorePosts in ViewPostDetailActivity.
This commit is contained in:
@ -214,6 +214,10 @@ public class ViewPostDetailActivity extends BaseActivity implements SortTypeSele
|
||||
} else {
|
||||
mViewPager2 = binding.viewPager2ViewPostDetailActivity;
|
||||
}
|
||||
|
||||
sectionsPagerAdapter = new SectionsPagerAdapter(this);
|
||||
binding.viewPager2ViewPostDetailActivity.setAdapter(sectionsPagerAdapter);
|
||||
|
||||
postFragmentId = getIntent().getLongExtra(EXTRA_POST_FRAGMENT_ID, -1);
|
||||
if (swipeBetweenPosts && posts == null && postFragmentId > 0) {
|
||||
EventBus.getDefault().post(new NeedForPostListFromPostFragmentEvent(postFragmentId));
|
||||
@ -283,9 +287,6 @@ public class ViewPostDetailActivity extends BaseActivity implements SortTypeSele
|
||||
}
|
||||
});
|
||||
|
||||
sectionsPagerAdapter = new SectionsPagerAdapter(this);
|
||||
binding.viewPager2ViewPostDetailActivity.setAdapter(sectionsPagerAdapter);
|
||||
|
||||
checkNewAccountAndBindView(savedInstanceState);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user