mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-03-22 06:59:21 +01:00
Change icons for folder based albums
This commit is contained in:
parent
eb4bdf47d2
commit
8efdd17153
2 changed files with 5 additions and 5 deletions
|
@ -8,7 +8,7 @@ class AlbumGridItem extends StatelessWidget {
|
||||||
@required this.cover,
|
@required this.cover,
|
||||||
@required this.title,
|
@required this.title,
|
||||||
this.subtitle,
|
this.subtitle,
|
||||||
this.isDynamic = false,
|
this.icon,
|
||||||
this.isSelected = false,
|
this.isSelected = false,
|
||||||
this.onTap,
|
this.onTap,
|
||||||
this.onLongPress,
|
this.onLongPress,
|
||||||
|
@ -51,13 +51,13 @@ class AlbumGridItem extends StatelessWidget {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (isDynamic)
|
if (icon != null)
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(16),
|
padding: const EdgeInsets.all(16),
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: AlignmentDirectional.topEnd,
|
alignment: AlignmentDirectional.topEnd,
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.auto_awesome,
|
icon,
|
||||||
size: 16,
|
size: 16,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
|
@ -100,7 +100,7 @@ class AlbumGridItem extends StatelessWidget {
|
||||||
final Widget cover;
|
final Widget cover;
|
||||||
final String title;
|
final String title;
|
||||||
final String subtitle;
|
final String subtitle;
|
||||||
final bool isDynamic;
|
final IconData icon;
|
||||||
final bool isSelected;
|
final bool isSelected;
|
||||||
final VoidCallback onTap;
|
final VoidCallback onTap;
|
||||||
final VoidCallback onLongPress;
|
final VoidCallback onLongPress;
|
||||||
|
|
|
@ -188,7 +188,7 @@ class _HomeAlbumsState extends State<HomeAlbums> {
|
||||||
cover: _buildAlbumCover(context, item.album),
|
cover: _buildAlbumCover(context, item.album),
|
||||||
title: item.album.name,
|
title: item.album.name,
|
||||||
subtitle: subtitle,
|
subtitle: subtitle,
|
||||||
isDynamic: item.album.provider is! AlbumStaticProvider,
|
icon: item.album.provider is AlbumDirProvider ? Icons.folder : null,
|
||||||
isSelected: _selectedItems.contains(item),
|
isSelected: _selectedItems.contains(item),
|
||||||
onTap: () => _onItemTap(item),
|
onTap: () => _onItemTap(item),
|
||||||
onLongPress: _isSelectionMode ? null : () => _onItemLongPress(item),
|
onLongPress: _isSelectionMode ? null : () => _onItemLongPress(item),
|
||||||
|
|
Loading…
Reference in a new issue