fix(llc, ui): message search pagination

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2021-09-06 19:35:04 +05:30
committed by xsahil03x
parent 8585456edd
commit 4ddb0703b3
11 changed files with 127 additions and 29 deletions
@@ -117,8 +117,9 @@ class MessageDao extends DatabaseAccessor<MoorChatDatabase>
msgList.removeRange(0, greaterThanIndex);
}
}
if (options?.limit != null) {
return msgList.take(options!.limit).toList();
final limit = options?.limit;
if (limit != null && limit > 0) {
return msgList.take(limit).toList();
}
}
return msgList;