fix: Type error when combining dynamic lists
This commit is contained in:
parent
dbedaf9d79
commit
245cf59205
|
|
@ -1585,7 +1585,12 @@ class MatrixSdkDatabase extends DatabaseApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Combine those two lists while respecting the start and limit parameters.
|
// Combine those two lists while respecting the start and limit parameters.
|
||||||
final eventIds = sendingEventIds + timelineEventIds;
|
// Create a new list object instead of concatonating list to prevent
|
||||||
|
// random type errors.
|
||||||
|
final eventIds = [
|
||||||
|
...sendingEventIds,
|
||||||
|
...timelineEventIds,
|
||||||
|
];
|
||||||
if (limit != null && eventIds.length > limit) {
|
if (limit != null && eventIds.length > limit) {
|
||||||
eventIds.removeRange(limit, eventIds.length);
|
eventIds.removeRange(limit, eventIds.length);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue