Fix wrong display name used to construct AlbumShare

This commit is contained in:
Ming Ming 2021-11-20 03:02:13 +08:00
parent 8f9879b1d4
commit ee171b8187
2 changed files with 2 additions and 2 deletions

View file

@ -193,7 +193,7 @@ class ListAlbumShareOutlierBloc extends Bloc<ListAlbumShareOutlierBlocEvent,
.firstWhere((s) => s.shareWith == ev.album.albumFile!.ownerId); .firstWhere((s) => s.shareWith == ev.album.albumFile!.ownerId);
temp.add(AlbumShare( temp.add(AlbumShare(
userId: ownerSharee.shareWith, userId: ownerSharee.shareWith,
displayName: ownerSharee.shareWithDisplayNameUnique, displayName: ownerSharee.label,
)); ));
} }
return Map.fromEntries(temp.map((as) => MapEntry(as.userId, as))); return Map.fromEntries(temp.map((as) => MapEntry(as.userId, as)));

View file

@ -27,7 +27,7 @@ class ShareAlbumWithUser {
shares: OrNull((album.shares ?? []) shares: OrNull((album.shares ?? [])
..add(AlbumShare( ..add(AlbumShare(
userId: sharee.shareWith, userId: sharee.shareWith,
displayName: sharee.shareWithDisplayNameUnique, displayName: sharee.label,
))), ))),
); );
await UpdateAlbum(albumRepo)(account, newAlbum); await UpdateAlbum(albumRepo)(account, newAlbum);