1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-25 10:43:13 +02:00

fix(mobile): "preselectedAssets" parameter not working (#3516)

* fix(mobile): "preselectedAssets" parameter not working

* fix(mobile): create album page "initialAssets" parameter not working
This commit is contained in:
X 2023-08-04 00:40:10 +08:00 committed by GitHub
parent 5617b57b26
commit fa03ed7dd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -30,7 +30,7 @@ class CreateAlbumPage extends HookConsumerWidget {
final albumTitleTextFieldFocusNode = useFocusNode();
final isAlbumTitleTextFieldFocus = useState(false);
final isAlbumTitleEmpty = useState(true);
final selectedAssets = useState<Set<Asset>>(const {});
final selectedAssets = useState<Set<Asset>>(initialAssets != null ? Set.from(initialAssets!) : const {});
final isDarkTheme = Theme.of(context).brightness == Brightness.dark;
showSelectUserPage() async {

View File

@ -381,6 +381,9 @@ class ImmichAssetGridViewState extends State<ImmichAssetGridView> {
if (widget.visibleItemsListener != null) {
_itemPositionsListener.itemPositions.addListener(_positionListener);
}
if (widget.preselectedAssets != null) {
_selectedAssets.addAll(widget.preselectedAssets!);
}
}
@override