Show only relevat actions for hidden collection and it's files
This commit is contained in:
parent
4af99ea2f0
commit
3d4bb87891
|
@ -6,6 +6,7 @@ import "package:photos/core/event_bus.dart";
|
|||
import "package:photos/events/collection_updated_event.dart";
|
||||
import "package:photos/generated/l10n.dart";
|
||||
import "package:photos/models/collection.dart";
|
||||
import "package:photos/models/gallery_type.dart";
|
||||
import "package:photos/theme/ente_theme.dart";
|
||||
import "package:photos/ui/collections/album/row_item.dart";
|
||||
import "package:photos/ui/common/loading_widget.dart";
|
||||
|
@ -13,10 +14,12 @@ import "package:photos/ui/common/loading_widget.dart";
|
|||
class AlbumHorizontalList extends StatefulWidget {
|
||||
final Future<List<Collection>> Function() collectionsFuture;
|
||||
final bool? hasVerifiedLock;
|
||||
final GalleryType? galleryType;
|
||||
|
||||
const AlbumHorizontalList(
|
||||
this.collectionsFuture, {
|
||||
this.hasVerifiedLock,
|
||||
this.galleryType,
|
||||
Key? key,
|
||||
}) : super(key: key);
|
||||
|
||||
|
@ -89,6 +92,7 @@ class _AlbumHorizontalListState extends State<AlbumHorizontalList> {
|
|||
120,
|
||||
showFileCount: false,
|
||||
hasVerifiedLock: widget.hasVerifiedLock,
|
||||
galleryType: widget.galleryType,
|
||||
);
|
||||
},
|
||||
),
|
||||
|
|
|
@ -21,6 +21,7 @@ class AlbumRowItemWidget extends StatelessWidget {
|
|||
final bool showFileCount;
|
||||
final String tag;
|
||||
final bool? hasVerifiedLock;
|
||||
final GalleryType? galleryType;
|
||||
|
||||
const AlbumRowItemWidget(
|
||||
this.c,
|
||||
|
@ -29,6 +30,7 @@ class AlbumRowItemWidget extends StatelessWidget {
|
|||
this.showFileCount = true,
|
||||
this.tag = "",
|
||||
this.hasVerifiedLock,
|
||||
this.galleryType,
|
||||
});
|
||||
|
||||
@override
|
||||
|
@ -195,11 +197,13 @@ class AlbumRowItemWidget extends StatelessWidget {
|
|||
CollectionPage(
|
||||
CollectionWithThumbnail(c, thumbnail),
|
||||
tagPrefix: tagPrefix,
|
||||
appBarType: isOwner
|
||||
? (c.type == CollectionType.favorites
|
||||
? GalleryType.favorite
|
||||
: GalleryType.ownedCollection)
|
||||
: GalleryType.sharedCollection,
|
||||
appBarType: galleryType == null
|
||||
? isOwner
|
||||
? (c.type == CollectionType.favorites
|
||||
? GalleryType.favorite
|
||||
: GalleryType.ownedCollection)
|
||||
: GalleryType.sharedCollection
|
||||
: galleryType!,
|
||||
hasVerifiedLock: hasVerifiedLock,
|
||||
),
|
||||
);
|
||||
|
|
|
@ -80,7 +80,7 @@ class HiddenCollectionsButtonWidget extends StatelessWidget {
|
|||
if (hasAuthenticated) {
|
||||
routeToPage(
|
||||
context,
|
||||
HiddenPage(),
|
||||
const HiddenPage(),
|
||||
);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -122,6 +122,7 @@ class _HiddenPageState extends State<HiddenPage> {
|
|||
initialFiles: null,
|
||||
emptyState: const EmptyHiddenWidget(),
|
||||
header: AlbumHorizontalList(
|
||||
galleryType: GalleryType.hidden,
|
||||
() async {
|
||||
return _hiddenCollectionsExcludingDefault;
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue