[Store] remove s of Users as the table actually is named User

Took 1 minute
This commit is contained in:
Marcel 2019-07-03 15:55:06 +02:00
parent 47d92406b7
commit fab4604b08
1 changed files with 1 additions and 1 deletions

View File

@ -464,7 +464,7 @@ class Store {
/// Returns a list of events for the given room and sets all participants. /// Returns a list of events for the given room and sets all participants.
Future<List<Event>> getEventList(Room room) async { Future<List<Event>> getEventList(Room room) async {
List<Map<String, dynamic>> memberRes = await db.rawQuery( List<Map<String, dynamic>> memberRes = await db.rawQuery(
"SELECT * " + " FROM User " + " WHERE users.chat_id=?", [room.id]); "SELECT * " + " FROM User " + " WHERE User.chat_id=?", [room.id]);
Map<String, User> userMap = {}; Map<String, User> userMap = {};
for (num i = 0; i < memberRes.length; i++) for (num i = 0; i < memberRes.length; i++)
userMap[memberRes[i]["matrix_id"]] = User.fromJson(memberRes[i], room); userMap[memberRes[i]["matrix_id"]] = User.fromJson(memberRes[i], room);