Merge pull request #1675 from famedly/krille/combine-lists-type-error
fix: Type error when combining dynamic lists
This commit is contained in:
commit
872e565de1
|
|
@ -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