Merge branch 'soru/less-rerender' into 'master'

Filter the onSync stream to only include updates that we want to deal with to re-render

Closes #27

See merge request ChristianPauly/fluffychat-flutter!123
This commit is contained in:
Christian Pauly 2020-07-27 11:13:25 +00:00
commit 2c662698c4
4 changed files with 12 additions and 4 deletions

View file

@ -337,7 +337,11 @@ class _ChatListState extends State<ChatList> {
(r) => r.isFirst),
),
body: StreamBuilder(
stream: Matrix.of(context).client.onSync.stream,
stream: Matrix.of(context)
.client
.onSync
.stream
.where((s) => s.hasRoomUpdate),
builder: (context, snapshot) {
return FutureBuilder<void>(
future: waitForFirstSync(context),