refactor: Use Provider
This commit is contained in:
parent
2cf9bf4810
commit
cd0b0bbdfe
2 changed files with 10 additions and 37 deletions
|
|
@ -300,16 +300,11 @@ class _ChatListState extends State<ChatList> {
|
|||
ConnectionStatusHeader(),
|
||||
Expanded(
|
||||
child: StreamBuilder(
|
||||
stream:
|
||||
Matrix.of(context).client.onSync.stream.where(
|
||||
(s) =>
|
||||
s.hasRoomUpdate ||
|
||||
s.accountData
|
||||
.where((a) =>
|
||||
a.type ==
|
||||
MatrixState.userStatusesType)
|
||||
.isNotEmpty,
|
||||
),
|
||||
stream: Matrix.of(context)
|
||||
.client
|
||||
.onSync
|
||||
.stream
|
||||
.where((s) => s.hasRoomUpdate),
|
||||
builder: (context, snapshot) {
|
||||
return FutureBuilder<void>(
|
||||
future: waitForFirstSync(context),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue