mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-02 06:46:22 +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.title,
|
||||
this.subtitle,
|
||||
this.isDynamic = false,
|
||||
this.icon,
|
||||
this.isSelected = false,
|
||||
this.onTap,
|
||||
this.onLongPress,
|
||||
|
@ -51,13 +51,13 @@ class AlbumGridItem extends StatelessWidget {
|
|||
],
|
||||
),
|
||||
),
|
||||
if (isDynamic)
|
||||
if (icon != null)
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Align(
|
||||
alignment: AlignmentDirectional.topEnd,
|
||||
child: Icon(
|
||||
Icons.auto_awesome,
|
||||
icon,
|
||||
size: 16,
|
||||
color: Colors.white,
|
||||
),
|
||||
|
@ -100,7 +100,7 @@ class AlbumGridItem extends StatelessWidget {
|
|||
final Widget cover;
|
||||
final String title;
|
||||
final String subtitle;
|
||||
final bool isDynamic;
|
||||
final IconData icon;
|
||||
final bool isSelected;
|
||||
final VoidCallback onTap;
|
||||
final VoidCallback onLongPress;
|
||||
|
|
|
@ -188,7 +188,7 @@ class _HomeAlbumsState extends State<HomeAlbums> {
|
|||
cover: _buildAlbumCover(context, item.album),
|
||||
title: item.album.name,
|
||||
subtitle: subtitle,
|
||||
isDynamic: item.album.provider is! AlbumStaticProvider,
|
||||
icon: item.album.provider is AlbumDirProvider ? Icons.folder : null,
|
||||
isSelected: _selectedItems.contains(item),
|
||||
onTap: () => _onItemTap(item),
|
||||
onLongPress: _isSelectionMode ? null : () => _onItemLongPress(item),
|
||||
|
|
Loading…
Reference in a new issue