drift(mobile): drift auth user sync

This commit is contained in:
wuzihao051119
2025-07-25 12:28:02 +08:00
parent ad65e9011a
commit 4677ceb03c
69 changed files with 9116 additions and 1206 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ class EntityService {
if (ownerId != null) {
// replace owner with user from database
final user = await _isarUserRepository.getByUserId(ownerId);
album.owner.value = user == null ? null : User.fromDto(user);
album.owner.value = user == null ? null : IsarUser.fromDto(user);
}
final thumbnailAssetId = album.remoteThumbnailAssetId ?? album.thumbnail.value?.remoteId;
if (thumbnailAssetId != null) {
@@ -29,7 +29,7 @@ class EntityService {
// replace all users with users from database
final users = await _isarUserRepository.getByUserIds(album.remoteUsers.map((user) => user.id).toList());
album.sharedUsers.clear();
album.sharedUsers.addAll(users.nonNulls.map(User.fromDto));
album.sharedUsers.addAll(users.nonNulls.map(IsarUser.fromDto));
album.shared = true;
}
if (album.remoteAssets.isNotEmpty) {