mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2025-01-03 06:30:07 +02:00
small fixes
This commit is contained in:
parent
0c726d1c55
commit
43edcf2f51
1 changed files with 3 additions and 2 deletions
|
@ -193,7 +193,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
|
||||||
if (binding.viewPager.getCurrentItem() == position) {
|
if (binding.viewPager.getCurrentItem() == position) {
|
||||||
scrollToTop();
|
scrollToTop();
|
||||||
} else {
|
} else {
|
||||||
binding.viewPager.setCurrentItem(position);
|
binding.viewPager.setCurrentItem(position, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -588,13 +588,14 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
binding.bottomNavView.setOnItemSelectedListener(item -> {
|
binding.bottomNavView.setOnItemSelectedListener(item -> {
|
||||||
|
|
||||||
int itemId = item.getItemId();
|
int itemId = item.getItemId();
|
||||||
int position = BottomMenu.getPosition(bottomMenu, itemId);
|
int position = BottomMenu.getPosition(bottomMenu, itemId);
|
||||||
if (position >= 0) {
|
if (position >= 0) {
|
||||||
if (binding.viewPager.getCurrentItem() == position) {
|
if (binding.viewPager.getCurrentItem() == position) {
|
||||||
scrollToTop();
|
scrollToTop();
|
||||||
} else {
|
} else {
|
||||||
binding.viewPager.setCurrentItem(position);
|
binding.viewPager.setCurrentItem(position, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue