Commit 3748076
committed
fix(firestore,windows): emit Pigeon objects on snapshot event sinks
The Pigeon 26 upgrade (#18205) changed the Dart-side EventChannel
handlers in `method_channel_document_reference.dart` and
`method_channel_query.dart` to expect the generated Pigeon class
directly (`snapshot as InternalDocumentSnapshot` /
`InternalQuerySnapshot`) and updated the Android stream handlers to
emit `PigeonParser.toPigeonQuerySnapshot(...)` / `toPigeonDocumentSnapshot(...)`
directly, but the Windows stream handlers in `cloud_firestore_plugin.cpp`
were missed and still emitted `Parse...(...).ToEncodableList()`.
As a result, on Windows every `DocumentReference.snapshots()`,
`Query.snapshots()` and (transitively) `FirebaseFirestore.snapshotsInSync()`
call threw `type 'List<Object?>' is not a subtype of type
'InternalDocumentSnapshot' in type cast` on the first event.
Wrap the Pigeon class in `CustomEncodableValue(...)` so the
Pigeon-aware codec on the EventChannel serializes it end-to-end, the
same way Android does.1 parent 456051e commit 3748076
1 file changed
Lines changed: 22 additions & 32 deletions
Lines changed: 22 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1567 | 1567 | | |
1568 | 1568 | | |
1569 | 1569 | | |
1570 | | - | |
1571 | | - | |
1572 | | - | |
1573 | | - | |
1574 | | - | |
1575 | | - | |
1576 | | - | |
1577 | | - | |
1578 | | - | |
1579 | | - | |
1580 | | - | |
1581 | | - | |
1582 | | - | |
1583 | | - | |
1584 | | - | |
1585 | | - | |
1586 | | - | |
1587 | | - | |
1588 | | - | |
1589 | | - | |
1590 | | - | |
1591 | | - | |
1592 | | - | |
1593 | | - | |
1594 | | - | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
1595 | 1581 | | |
1596 | 1582 | | |
1597 | 1583 | | |
| |||
1674 | 1660 | | |
1675 | 1661 | | |
1676 | 1662 | | |
1677 | | - | |
1678 | | - | |
1679 | | - | |
1680 | | - | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
1681 | 1667 | | |
1682 | | - | |
1683 | | - | |
1684 | | - | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
1685 | 1675 | | |
1686 | 1676 | | |
1687 | 1677 | | |
| |||
0 commit comments