chore: Revert onRoomUpdate logic
This commit is contained in:
parent
9d7bc52513
commit
ba3b86d48a
1 changed files with 1 additions and 11 deletions
|
|
@ -120,12 +120,6 @@ class ChatView extends StatelessWidget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasRoomStateUpdate(SyncUpdate syncUpdate) =>
|
|
||||||
syncUpdate.rooms?.leave?[controller.roomId]?.state?.isNotEmpty == true ||
|
|
||||||
syncUpdate.rooms?.invite?[controller.roomId]?.inviteState?.isNotEmpty ==
|
|
||||||
true ||
|
|
||||||
syncUpdate.rooms?.join?[controller.roomId]?.state?.isNotEmpty == true;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
controller.matrix ??= Matrix.of(context);
|
controller.matrix ??= Matrix.of(context);
|
||||||
|
|
@ -163,11 +157,7 @@ class ChatView extends StatelessWidget {
|
||||||
onTapDown: controller.setReadMarker,
|
onTapDown: controller.setReadMarker,
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
child: StreamBuilder(
|
child: StreamBuilder(
|
||||||
stream: Matrix.of(context)
|
stream: controller.room!.onUpdate.stream
|
||||||
.client
|
|
||||||
.onSync
|
|
||||||
.stream
|
|
||||||
.where(hasRoomStateUpdate)
|
|
||||||
.rateLimit(const Duration(seconds: 1)),
|
.rateLimit(const Duration(seconds: 1)),
|
||||||
builder: (context, snapshot) => FutureBuilder<bool>(
|
builder: (context, snapshot) => FutureBuilder<bool>(
|
||||||
future: controller.getTimeline(),
|
future: controller.getTimeline(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue