|
@@ -10,7 +10,6 @@ import 'package:flutter_sodium/flutter_sodium.dart';
|
|
|
import 'package:photos/ente_theme_data.dart';
|
|
|
import 'package:photos/models/collection.dart';
|
|
|
import 'package:photos/services/collections_service.dart';
|
|
|
-import 'package:photos/services/feature_flag_service.dart';
|
|
|
import 'package:photos/theme/colors.dart';
|
|
|
import 'package:photos/theme/ente_theme.dart';
|
|
|
import 'package:photos/ui/common/dialogs.dart';
|
|
@@ -59,41 +58,6 @@ class _ManageSharedLinkWidgetState extends State<ManageSharedLinkWidget> {
|
|
|
Widget build(BuildContext context) {
|
|
|
final enteColorScheme = getEnteColorScheme(context);
|
|
|
final PublicURL url = widget.collection?.publicURLs?.firstOrNull;
|
|
|
- final enableCollectFeature = FeatureFlagService.instance.enableCollect();
|
|
|
- final Widget collect = enableCollectFeature
|
|
|
- ? Column(
|
|
|
- crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
- children: [
|
|
|
- MenuItemWidget(
|
|
|
- captionedTextWidget: const CaptionedTextWidget(
|
|
|
- title: "Allow adding photos",
|
|
|
- ),
|
|
|
- alignCaptionedTextToLeft: true,
|
|
|
- menuItemColor: getEnteColorScheme(context).fillFaint,
|
|
|
- pressedColor: getEnteColorScheme(context).fillFaint,
|
|
|
- trailingWidget: Switch.adaptive(
|
|
|
- value: widget
|
|
|
- .collection.publicURLs?.firstOrNull?.enableCollect ??
|
|
|
- false,
|
|
|
- onChanged: (value) async {
|
|
|
- await _updateUrlSettings(
|
|
|
- context,
|
|
|
- {'enableCollect': value},
|
|
|
- );
|
|
|
-
|
|
|
- setState(() {});
|
|
|
- },
|
|
|
- ),
|
|
|
- ),
|
|
|
- const MenuSectionDescriptionWidget(
|
|
|
- content:
|
|
|
- "Allow people with the link to also add photos to the shared "
|
|
|
- "album.",
|
|
|
- ),
|
|
|
- const SizedBox(height: 24)
|
|
|
- ],
|
|
|
- )
|
|
|
- : const SizedBox.shrink();
|
|
|
return Scaffold(
|
|
|
backgroundColor: Theme.of(context).backgroundColor,
|
|
|
appBar: AppBar(
|
|
@@ -110,7 +74,33 @@ class _ManageSharedLinkWidgetState extends State<ManageSharedLinkWidget> {
|
|
|
child: Column(
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
children: [
|
|
|
- collect,
|
|
|
+ MenuItemWidget(
|
|
|
+ captionedTextWidget: const CaptionedTextWidget(
|
|
|
+ title: "Allow adding photos",
|
|
|
+ ),
|
|
|
+ alignCaptionedTextToLeft: true,
|
|
|
+ menuItemColor: getEnteColorScheme(context).fillFaint,
|
|
|
+ pressedColor: getEnteColorScheme(context).fillFaint,
|
|
|
+ trailingWidget: Switch.adaptive(
|
|
|
+ value: widget.collection.publicURLs?.firstOrNull?.enableCollect ??
|
|
|
+ false,
|
|
|
+ onChanged: (value) async {
|
|
|
+ await _updateUrlSettings(
|
|
|
+ context,
|
|
|
+ {'enableCollect': value},
|
|
|
+ );
|
|
|
+
|
|
|
+ setState(() {});
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ const MenuSectionDescriptionWidget(
|
|
|
+ content:
|
|
|
+ "Allow people with the link to also add photos to the shared "
|
|
|
+ "album.",
|
|
|
+ ),
|
|
|
+ const SizedBox(height: 24)
|
|
|
+ ],
|
|
|
MenuItemWidget(
|
|
|
alignCaptionedTextToLeft: true,
|
|
|
captionedTextWidget: CaptionedTextWidget(
|