news & radars pagination bug fixed

This commit is contained in:
MohammadTaha Basiri 2022-03-07 16:58:16 +03:30
parent c1f7aeab86
commit 5363f327e0
2 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ class _NewsState extends State<News> {
state: state,
builder: (context, state, index) {
index += 2;
if (index % 15 == 0 && index / 15 >= state.page) {
if (index % 15 == 0 && state.lastPage != state.page) {
state.getNews(page: index ~/ 15 + 1);
}
index -= 2;

View File

@ -129,7 +129,7 @@ class _RadarState extends State<Radar> {
placeholder: RadarOverview.placeholder,
builder: (context, state, index) {
index += 2;
if (index % 15 == 0 && index / 15 >= state.page) {
if (index % 15 == 0 && state.lastPage != state.page) {
state.getRadars(page: index ~/ 15 + 1);
}
index -= 2;