mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-21 15:05:19 +00:00
Fixing scrolling issues in emoji reactions
This commit is contained in:
parent
8b10527125
commit
b95fe8c83d
@ -103,7 +103,9 @@ public final class ReactionsDialogFragment extends BottomSheetDialogFragment imp
|
||||
|
||||
ViewCompat.setOnApplyWindowInsetsListener(container, (v, insets) -> insets.consumeSystemWindowInsets());
|
||||
|
||||
TabLayoutMediator mediator = new TabLayoutMediator(emojiTabs, recipientPagerView, (tab, position) -> {
|
||||
TabLayoutMediator mediator = new TabLayoutMediator(
|
||||
emojiTabs, recipientPagerView, true, false,
|
||||
(tab, position) -> {
|
||||
tab.setCustomView(R.layout.reactions_pill_large);
|
||||
|
||||
View customView = Objects.requireNonNull(tab.getCustomView());
|
||||
@ -141,21 +143,6 @@ public final class ReactionsDialogFragment extends BottomSheetDialogFragment imp
|
||||
|
||||
private void setUpRecipientsRecyclerView() {
|
||||
recipientsAdapter = new ReactionViewPagerAdapter(this);
|
||||
|
||||
recipientPagerView.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback() {
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
recipientPagerView.post(() -> recipientsAdapter.enableNestedScrollingForPosition(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageScrollStateChanged(int state) {
|
||||
if (state == ViewPager2.SCROLL_STATE_IDLE) {
|
||||
recipientPagerView.requestLayout();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
recipientPagerView.setAdapter(recipientsAdapter);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user