fix getThreadMessagesByParentId
This commit is contained in:
@@ -102,7 +102,7 @@ class MessageDao extends DatabaseAccessor<MoorChatDatabase>
|
|||||||
.map(_messageFromJoinRow)
|
.map(_messageFromJoinRow)
|
||||||
.get());
|
.get());
|
||||||
|
|
||||||
if (options?.lessThan != null) {
|
if (options?.lessThan != null && msgList.isNotEmpty) {
|
||||||
final lessThanIndex = msgList.indexWhere((m) => m.id == options.lessThan);
|
final lessThanIndex = msgList.indexWhere((m) => m.id == options.lessThan);
|
||||||
msgList.removeRange(lessThanIndex, msgList.length);
|
msgList.removeRange(lessThanIndex, msgList.length);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user