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
2 changed files with 4 additions and 1 deletions
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue