Fix next page condition not working

This commit is contained in:
kolaente 2020-04-27 18:27:26 +02:00
parent 25d64f14a5
commit a34daacf23
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 4 additions and 2 deletions

View File

@ -68,8 +68,10 @@ class _ListPageState extends State<ListPage> {
index == _tasks.length - 1) return null;
if (index >= _tasks.length &&
VikunjaGlobal.of(context).taskService.maxPages <
_currentPage) {
_currentPage <
VikunjaGlobal.of(context)
.taskService
.maxPages) {
_currentPage++;
// FIXME: This does not get loaded until some time after the next (_tasks.length + 1) entry should have been rendered
// This leads to errors because the render method tries to access an entry of _tasks with an index which does not exist