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

This commit is contained in:
Sorunome 2020-07-27 11:13:25 +00:00 committed by Christian Pauly
commit 3b1a6e4cea
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),