mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
feat(mobile): Archive feature on mobile (#2258)
* update asset to include isArchive property * Not display archived assets on timeline * replace share button to archive button * Added archive page * Add bottom nav bar * clean up homepage * remove deadcode * improve on sync is archive * show archive asset correctly * better merge condition * Added back renderList to re-rendering don't jump around * Better way to handle showing archive assets * complete ArchiveSelectionNotifier * toggle archive * remove deadcode * fix unit tests * update assets in DB when changing assets * update asset state to reflect archived status * allow to archive assets via multi-select from timeline * fixed logic * Add options to bulk unarchive * regenerate api * Change position of toast message --------- Co-authored-by: Fynn Petersen-Frey <zoodyy@users.noreply.github.com>
This commit is contained in:
@@ -9,8 +9,6 @@ class TopControlAppBar extends HookConsumerWidget {
|
||||
required this.asset,
|
||||
required this.onMoreInfoPressed,
|
||||
required this.onDownloadPressed,
|
||||
required this.onSharePressed,
|
||||
required this.onDeletePressed,
|
||||
required this.onAddToAlbumPressed,
|
||||
required this.onToggleMotionVideo,
|
||||
required this.isPlayingMotionVideo,
|
||||
@@ -22,10 +20,8 @@ class TopControlAppBar extends HookConsumerWidget {
|
||||
final Function onMoreInfoPressed;
|
||||
final VoidCallback? onDownloadPressed;
|
||||
final VoidCallback onToggleMotionVideo;
|
||||
final VoidCallback onDeletePressed;
|
||||
final VoidCallback onAddToAlbumPressed;
|
||||
final VoidCallback onFavorite;
|
||||
final Function onSharePressed;
|
||||
final bool isPlayingMotionVideo;
|
||||
final bool isFavorite;
|
||||
|
||||
@@ -34,15 +30,15 @@ class TopControlAppBar extends HookConsumerWidget {
|
||||
const double iconSize = 18.0;
|
||||
|
||||
Widget buildFavoriteButton() {
|
||||
return IconButton(
|
||||
onPressed: () {
|
||||
onFavorite();
|
||||
},
|
||||
icon: Icon(
|
||||
isFavorite ? Icons.star : Icons.star_border,
|
||||
color: Colors.grey[200],
|
||||
),
|
||||
);
|
||||
return IconButton(
|
||||
onPressed: () {
|
||||
onFavorite();
|
||||
},
|
||||
icon: Icon(
|
||||
isFavorite ? Icons.star : Icons.star_border,
|
||||
color: Colors.grey[200],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return AppBar(
|
||||
@@ -86,15 +82,6 @@ class TopControlAppBar extends HookConsumerWidget {
|
||||
color: Colors.grey[200],
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
onSharePressed();
|
||||
},
|
||||
icon: Icon(
|
||||
Icons.ios_share_rounded,
|
||||
color: Colors.grey[200],
|
||||
),
|
||||
),
|
||||
if (asset.isRemote)
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
@@ -105,15 +92,6 @@ class TopControlAppBar extends HookConsumerWidget {
|
||||
color: Colors.grey[200],
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
onDeletePressed();
|
||||
},
|
||||
icon: Icon(
|
||||
Icons.delete_outline_rounded,
|
||||
color: Colors.grey[200],
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
onMoreInfoPressed();
|
||||
|
||||
Reference in New Issue
Block a user