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
|
|
@ -21,7 +21,8 @@ class MultipleEmotesSettingsView extends StatelessWidget {
|
|||
title: Text(L10n.of(context)!.emotePacks),
|
||||
),
|
||||
body: StreamBuilder(
|
||||
stream: room.onUpdate.stream,
|
||||
stream: room.client.onRoomState.stream
|
||||
.where((update) => update.roomId == room.id),
|
||||
builder: (context, snapshot) {
|
||||
final packStateEvents = room.states['im.ponies.room_emotes'];
|
||||
// we need to manually convert the map using Map.of, otherwise assigning null will throw a type error.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue