mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
feat(mobile): shared album activities (#4833)
* fix(server): global activity like duplicate search * mobile: user_circle_avatar - fallback to text icon if no profile pic available * mobile: use favourite icon in search "your activity" * feat(mobile): shared album activities * mobile: align hearts with user profile icon * styling * replace bottom sheet with dismissible * add auto focus to the input --------- Co-authored-by: shalong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
parent
c74ea7282a
commit
26fd9d7e5f
20 changed files with 890 additions and 15 deletions
|
|
@ -49,6 +49,7 @@ class GalleryViewerPage extends HookConsumerWidget {
|
|||
final int heroOffset;
|
||||
final bool showStack;
|
||||
final bool isOwner;
|
||||
final String? sharedAlbumId;
|
||||
|
||||
GalleryViewerPage({
|
||||
super.key,
|
||||
|
|
@ -58,6 +59,7 @@ class GalleryViewerPage extends HookConsumerWidget {
|
|||
this.heroOffset = 0,
|
||||
this.showStack = false,
|
||||
this.isOwner = true,
|
||||
this.sharedAlbumId,
|
||||
}) : controller = PageController(initialPage: initialIndex);
|
||||
|
||||
final PageController controller;
|
||||
|
|
@ -327,6 +329,19 @@ class GalleryViewerPage extends HookConsumerWidget {
|
|||
);
|
||||
}
|
||||
|
||||
handleActivities() {
|
||||
if (sharedAlbumId != null) {
|
||||
AutoRouter.of(context).push(
|
||||
ActivitiesRoute(
|
||||
albumId: sharedAlbumId!,
|
||||
assetId: asset().remoteId,
|
||||
withAssetThumbs: false,
|
||||
isOwner: isOwner,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
buildAppBar() {
|
||||
return IgnorePointer(
|
||||
ignoring: !ref.watch(showControlsProvider),
|
||||
|
|
@ -355,6 +370,8 @@ class GalleryViewerPage extends HookConsumerWidget {
|
|||
isPlayingMotionVideo.value = !isPlayingMotionVideo.value;
|
||||
}),
|
||||
onAddToAlbumPressed: () => addToAlbum(asset()),
|
||||
shareAlbumId: sharedAlbumId,
|
||||
onActivitiesPressed: handleActivities,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue