style: Apply team linter in stream chat persistence (#331)
* lint(persistence): Apply team linter Signed-off-by: Sahil Kumar <[email protected]> * style: flutter format Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
@@ -2,7 +2,7 @@ import 'package:moor/moor.dart';
|
||||
import 'package:stream_chat/stream_chat.dart';
|
||||
import 'package:stream_chat_persistence/src/db/moor_chat_database.dart';
|
||||
import 'package:stream_chat_persistence/src/entity/users.dart';
|
||||
import '../mapper/user_mapper.dart';
|
||||
import 'package:stream_chat_persistence/src/mapper/user_mapper.dart';
|
||||
|
||||
part 'user_dao.g.dart';
|
||||
|
||||
@@ -13,13 +13,11 @@ class UserDao extends DatabaseAccessor<MoorChatDatabase> with _$UserDaoMixin {
|
||||
UserDao(MoorChatDatabase db) : super(db);
|
||||
|
||||
/// Updates the users data with the new [userList] data
|
||||
Future<void> updateUsers(List<User> userList) {
|
||||
return batch(
|
||||
(it) => it.insertAll(
|
||||
users,
|
||||
userList.map((u) => u.toEntity()).toList(),
|
||||
mode: InsertMode.insertOrReplace,
|
||||
),
|
||||
);
|
||||
}
|
||||
Future<void> updateUsers(List<User> userList) => batch(
|
||||
(it) => it.insertAll(
|
||||
users,
|
||||
userList.map((u) => u.toEntity()).toList(),
|
||||
mode: InsertMode.insertOrReplace,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user