Skip to content

Commit

Permalink
still use lazy loading for internal members list
Browse files Browse the repository at this point in the history
  • Loading branch information
Airyzz committed Jun 28, 2024
1 parent 1485393 commit a07fc87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
9 changes: 2 additions & 7 deletions commet/lib/client/matrix/matrix_room.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import 'package:commet/debug/log.dart';
import 'package:commet/main.dart';
import 'package:commet/utils/image_utils.dart';
import 'package:commet/utils/mime.dart';
import 'package:commet/utils/notifying_list.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:html_unescape/html_unescape.dart';
Expand Down Expand Up @@ -53,11 +52,6 @@ class MatrixRoom extends Room {

late final List<RoomComponent<MatrixClient, MatrixRoom>> _components;

final NotifyingList<String> _memberIds = NotifyingList.empty(growable: true);

@override
Stream<void> get membersUpdated => _memberIds.onListUpdated;

ImageProvider? _avatar;

late MatrixClient _client;
Expand Down Expand Up @@ -100,7 +94,8 @@ class MatrixRoom extends Room {
TimelineEvent? lastEvent;

@override
Iterable<String> get memberIds => _memberIds;
Iterable<String> get memberIds =>
_matrixRoom.getParticipants([matrix.Membership.join]).map((e) => e.id);

@override
String get developerInfo =>
Expand Down
3 changes: 0 additions & 3 deletions commet/lib/client/room.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ abstract class Room {
/// Stream which is called when the room state updates
Stream<void> get onUpdate;

/// Stream which gets called when the members list is updated
Stream<void> get membersUpdated;

/// Rule for push notifications for this room
PushRule get pushRule;

Expand Down

0 comments on commit a07fc87

Please sign in to comment.