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