[Room] Remove loadEvents
This commit is contained in:
parent
dddc9a23c6
commit
7b4c51aae9
|
@ -499,7 +499,8 @@ class Room {
|
|||
Future<Timeline> getTimeline(
|
||||
{onTimelineUpdateCallback onUpdate,
|
||||
onTimelineInsertCallback onInsert}) async {
|
||||
List<Event> events = await loadEvents();
|
||||
List<Event> events = [];
|
||||
if (client.store != null) events = await client.store.getEventList(this);
|
||||
return Timeline(
|
||||
room: this,
|
||||
events: events,
|
||||
|
@ -508,13 +509,6 @@ class Room {
|
|||
);
|
||||
}
|
||||
|
||||
/// Load all events for a given room from the store. This includes all
|
||||
/// senders of those events, who will be added to the participants list.
|
||||
Future<List<Event>> loadEvents() async {
|
||||
if (client.store != null) return await client.store.getEventList(this);
|
||||
return [];
|
||||
}
|
||||
|
||||
/// Load all participants for a given room from the store.
|
||||
@deprecated
|
||||
Future<List<User>> loadParticipants() async {
|
||||
|
|
|
@ -235,11 +235,6 @@ void main() {
|
|||
expect(timeline.events, []);
|
||||
});
|
||||
|
||||
test("loadEvents", () async {
|
||||
final List<Event> events = await room.loadEvents();
|
||||
expect(events, []);
|
||||
});
|
||||
|
||||
test("getUserByMXID", () async {
|
||||
final User user = await room.getUserByMXID("@getme:example.com");
|
||||
expect(user.stateKey, "@getme:example.com");
|
||||
|
|
Loading…
Reference in a new issue