mirror of
https://github.com/immich-app/immich.git
synced 2024-12-26 10:50:29 +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:
parent
5617b57b26
commit
fa03ed7dd7
@ -30,7 +30,7 @@ class CreateAlbumPage extends HookConsumerWidget {
|
|||||||
final albumTitleTextFieldFocusNode = useFocusNode();
|
final albumTitleTextFieldFocusNode = useFocusNode();
|
||||||
final isAlbumTitleTextFieldFocus = useState(false);
|
final isAlbumTitleTextFieldFocus = useState(false);
|
||||||
final isAlbumTitleEmpty = useState(true);
|
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;
|
final isDarkTheme = Theme.of(context).brightness == Brightness.dark;
|
||||||
|
|
||||||
showSelectUserPage() async {
|
showSelectUserPage() async {
|
||||||
|
@ -381,6 +381,9 @@ class ImmichAssetGridViewState extends State<ImmichAssetGridView> {
|
|||||||
if (widget.visibleItemsListener != null) {
|
if (widget.visibleItemsListener != null) {
|
||||||
_itemPositionsListener.itemPositions.addListener(_positionListener);
|
_itemPositionsListener.itemPositions.addListener(_positionListener);
|
||||||
}
|
}
|
||||||
|
if (widget.preselectedAssets != null) {
|
||||||
|
_selectedAssets.addAll(widget.preselectedAssets!);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
Loading…
Reference in New Issue
Block a user