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 3d39cac36b
4 changed files with 12 additions and 4 deletions

View file

@ -1,3 +1,7 @@
# Version 0.17.0 - 2020-08-??
### Fixes:
- Don't re-render the room list nearly as often, increasing performance
# Version 0.16.0 - 2020-07-24 # Version 0.16.0 - 2020-07-24
### Features ### Features
- Implement web notifications - Implement web notifications

View file

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

View file

@ -159,8 +159,8 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
path: "." path: "."
ref: ad8135990dcdc04ea0a650d08a681ebed27ef728 ref: "3fae58439bdc2100d26fbfb92a62c7fbb7b48903"
resolved-ref: ad8135990dcdc04ea0a650d08a681ebed27ef728 resolved-ref: "3fae58439bdc2100d26fbfb92a62c7fbb7b48903"
url: "https://gitlab.com/famedly/famedlysdk.git" url: "https://gitlab.com/famedly/famedlysdk.git"
source: git source: git
version: "0.0.1" version: "0.0.1"

View file

@ -27,7 +27,7 @@ dependencies:
famedlysdk: famedlysdk:
git: git:
url: https://gitlab.com/famedly/famedlysdk.git url: https://gitlab.com/famedly/famedlysdk.git
ref: ad8135990dcdc04ea0a650d08a681ebed27ef728 ref: 3fae58439bdc2100d26fbfb92a62c7fbb7b48903
localstorage: ^3.0.1+4 localstorage: ^3.0.1+4
bubble: ^1.1.9+1 bubble: ^1.1.9+1