drawer: added gif collection
This commit is contained in:
parent
b2f72d964f
commit
2bd8692875
2 changed files with 12 additions and 0 deletions
|
@ -29,6 +29,11 @@ class VideoFilter extends CollectionFilter {
|
|||
bool filter(ImageEntry entry) => entry.isVideo;
|
||||
}
|
||||
|
||||
class GifFilter extends CollectionFilter {
|
||||
@override
|
||||
bool filter(ImageEntry entry) => entry.isGif;
|
||||
}
|
||||
|
||||
class MetadataFilter extends CollectionFilter {
|
||||
final String value;
|
||||
|
||||
|
|
|
@ -84,6 +84,12 @@ class _AllCollectionDrawerState extends State<AllCollectionDrawer> {
|
|||
),
|
||||
);
|
||||
|
||||
final gifEntry = _FilteredCollectionNavTile(
|
||||
collection: collection,
|
||||
leading: const Icon(OMIcons.gif),
|
||||
title: 'GIFs',
|
||||
filter: GifFilter(),
|
||||
);
|
||||
final videoEntry = _FilteredCollectionNavTile(
|
||||
collection: collection,
|
||||
leading: const Icon(OMIcons.videoLibrary),
|
||||
|
@ -139,6 +145,7 @@ class _AllCollectionDrawerState extends State<AllCollectionDrawer> {
|
|||
child: Column(
|
||||
children: [
|
||||
header,
|
||||
gifEntry,
|
||||
videoEntry,
|
||||
if (specialAlbums.isNotEmpty) ...[
|
||||
const Divider(),
|
||||
|
|
Loading…
Reference in a new issue