Commit ee68d05f authored by Wilko Manger's avatar Wilko Manger

Only show currently joined members of chat in list

parent aa6eecdd
......@@ -34,7 +34,6 @@ class ChatSettingsBloc extends Bloc<ChatSettingsEvent, ChatSettingsState> {
ChatSettingsBloc(this._matrix, this._room);
@override
// TODO: implement initialState
ChatSettingsState get initialState => ChatSettingsUninitialized();
@override
......@@ -42,10 +41,12 @@ class ChatSettingsBloc extends Bloc<ChatSettingsEvent, ChatSettingsState> {
if (event is FetchMembers) {
final me = await _room.members[_matrix.user.id];
final members = List.of(
var members = List.of(
await _room.members.get(upTo: !event.all ? 6 : _room.members.count),
);
members = members.where((u) => u.state.membership is Joined).toList();
members.remove(me);
members.insert(0, me);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment