浏览代码

Route to mangage link for quick links

Neeraj Gupta 2 年之前
父节点
当前提交
2611c28fdf
共有 1 个文件被更改,包括 7 次插入2 次删除
  1. 7 2
      lib/ui/viewer/gallery/gallery_app_bar_widget.dart

+ 7 - 2
lib/ui/viewer/gallery/gallery_app_bar_widget.dart

@@ -26,6 +26,7 @@ import 'package:photos/ui/components/models/button_type.dart';
 import "package:photos/ui/map/enable_map.dart";
 import "package:photos/ui/map/enable_map.dart";
 import "package:photos/ui/map/map_screen.dart";
 import "package:photos/ui/map/map_screen.dart";
 import 'package:photos/ui/sharing/album_participants_page.dart';
 import 'package:photos/ui/sharing/album_participants_page.dart';
+import "package:photos/ui/sharing/manage_links_widget.dart";
 import 'package:photos/ui/sharing/share_collection_page.dart';
 import 'package:photos/ui/sharing/share_collection_page.dart';
 import 'package:photos/ui/tools/free_space_page.dart';
 import 'package:photos/ui/tools/free_space_page.dart';
 import "package:photos/ui/viewer/gallery/hooks/add_photos_sheet.dart";
 import "package:photos/ui/viewer/gallery/hooks/add_photos_sheet.dart";
@@ -305,7 +306,9 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
           message: "Share",
           message: "Share",
           child: IconButton(
           child: IconButton(
             icon: Icon(
             icon: Icon(
-              isQuickLink ? Icons.link_outlined : Icons.people_outlined,
+               isQuickLink && (widget.collection!.hasLink) ? Icons
+                   .link_outlined : Icons
+                   .people_outlined,
             ),
             ),
             onPressed: () async {
             onPressed: () async {
               await _showShareCollectionDialog();
               await _showShareCollectionDialog();
@@ -696,7 +699,9 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
         unawaited(
         unawaited(
           routeToPage(
           routeToPage(
             context,
             context,
-            ShareCollectionPage(collection),
+              (isQuickLink && (collection.hasLink)) ? ManageSharedLinkWidget(collection: collection!) :
+              ShareCollectionPage
+              (collection),
           ),
           ),
         );
         );
       } else {
       } else {