feat: album edit (#19936)

This commit is contained in:
Alex
2025-07-15 20:37:44 -05:00
committed by GitHub
parent bcb968e3d1
commit 34620e1e9a
22 changed files with 2271 additions and 102 deletions

View File

@@ -41,6 +41,11 @@ class AlbumViewer extends HookConsumerWidget {
final userId = ref.watch(authProvider).userId;
final isMultiselecting = ref.watch(multiselectProvider);
final isProcessing = useProcessingOverlay();
final isOwner = ref.watch(
currentAlbumProvider.select((album) {
return album?.ownerId == userId;
}),
);
Future<bool> onRemoveFromAlbumPressed(Iterable<Asset> assets) async {
final bool isSuccess =
@@ -138,10 +143,13 @@ class AlbumViewer extends HookConsumerWidget {
),
const AlbumSharedUserIcons(),
if (album.isRemote)
AlbumControlButton(
key: const ValueKey("albumControlButton"),
onAddPhotosPressed: onAddPhotosPressed,
onAddUsersPressed: onAddUsersPressed,
Padding(
padding: const EdgeInsets.only(left: 16.0),
child: AlbumControlButton(
key: const ValueKey("albumControlButton"),
onAddPhotosPressed: onAddPhotosPressed,
onAddUsersPressed: isOwner ? onAddUsersPressed : null,
),
),
const SizedBox(height: 8),
],