refactor: Use onRoomState stream instead of room.onUpdate to not update on messages but state changes only
This commit is contained in:
parent
06b2e6c14f
commit
ff54610e5b
6 changed files with 12 additions and 6 deletions
|
|
@ -150,7 +150,8 @@ class ChatView extends StatelessWidget {
|
|||
}
|
||||
},
|
||||
child: StreamBuilder(
|
||||
stream: controller.room.onUpdate.stream
|
||||
stream: controller.room.client.onRoomState.stream
|
||||
.where((update) => update.roomId == controller.room.id)
|
||||
.rateLimit(const Duration(seconds: 1)),
|
||||
builder: (context, snapshot) => FutureBuilder(
|
||||
future: controller.loadTimelineFuture,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue