Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Prune more Photos UI comments

Manav Rathicd48d4dcef62
diff --git a/mobile/apps/photos/lib/ui/account/login_pwd_verification_page.dart b/mobile/apps/photos/lib/ui/account/login_pwd_verification_page.dart
index 18658a0ba1..8d944c5b5f 100644
--- a/mobile/apps/photos/lib/ui/account/login_pwd_verification_page.dart
+++ b/mobile/apps/photos/lib/ui/account/login_pwd_verification_page.dart
@@ -13,11 +13,6 @@ import "package:photos/ui/components/buttons/button_widget.dart"
import "package:photos/utils/dialog_util.dart";
import "package:photos/utils/email_util.dart";
-// LoginPasswordVerificationPage is a page that allows the user to enter their password to verify their identity.
-// If the password is correct, then the user is either directed to
-// PasswordReentryPage (if the user has not yet set up 2FA) or TwoFactorAuthenticationPage (if the user has set up 2FA).
-// In the PasswordReentryPage, the password is auto-filled based on the
-// volatile password.
class LoginPasswordVerificationPage extends StatefulWidget {
final SrpAttributes srpAttributes;
@@ -207,7 +202,6 @@ class _LoginPasswordVerificationPageState
await dialog.hide();
if (e is LoginKeyDerivationError) {
_logger.severe('loginKey derivation error', e, s);
- // LoginKey err, perform regular login via ott verification
if (!context.mounted) return;
await UserService.instance.sendOtt(
context,
diff --git a/mobile/apps/photos/lib/ui/account/request_pwd_verification_page.dart b/mobile/apps/photos/lib/ui/account/request_pwd_verification_page.dart
index 07775410d2..6d3542f012 100644
--- a/mobile/apps/photos/lib/ui/account/request_pwd_verification_page.dart
+++ b/mobile/apps/photos/lib/ui/account/request_pwd_verification_page.dart
@@ -99,7 +99,6 @@ class _RequestPasswordVerificationPageState
CryptoUtil.base642bin(attributes.keyDecryptionNonce),
);
await dialog.show();
- // pop
await widget.onPasswordVerified(keyEncryptionKey);
await dialog.hide();
if (!mounted) return;
diff --git a/mobile/apps/photos/lib/ui/cast/pair_with_auto.dart b/mobile/apps/photos/lib/ui/cast/pair_with_auto.dart
index 6e9b18bc44..bdbf10638f 100644
--- a/mobile/apps/photos/lib/ui/cast/pair_with_auto.dart
+++ b/mobile/apps/photos/lib/ui/cast/pair_with_auto.dart
@@ -14,7 +14,6 @@ import "package:photos/theme/ente_theme.dart";
import "package:photos/ui/notification/toast.dart";
import "package:photos/utils/dialog_util.dart";
-/// Shows the auto-pairing sheet for Cast devices.
Future<void> showPairWithAutoSheet(
BuildContext context,
Collection collection,
diff --git a/mobile/apps/photos/lib/ui/collections/device/device_folder_row_item.dart b/mobile/apps/photos/lib/ui/collections/device/device_folder_row_item.dart
index 5beb3f0a77..bc77ba2e0c 100644
--- a/mobile/apps/photos/lib/ui/collections/device/device_folder_row_item.dart
+++ b/mobile/apps/photos/lib/ui/collections/device/device_folder_row_item.dart
@@ -21,8 +21,6 @@ class DeviceFolderRowItem extends StatelessWidget {
const DeviceFolderRowItem(
this.deviceCollection, {
-
- ///120 is default for the 'on device' scrollview in albums section
this.sideOfThumbnail = 120,
super.key,
});
diff --git a/mobile/apps/photos/lib/ui/common/progress_dialog.dart b/mobile/apps/photos/lib/ui/common/progress_dialog.dart
index 93d445bfb3..581a8604ad 100644
--- a/mobile/apps/photos/lib/ui/common/progress_dialog.dart
+++ b/mobile/apps/photos/lib/ui/common/progress_dialog.dart
@@ -204,8 +204,7 @@ class ProgressDialog {
);
},
);
- // Delaying the function for 200 milliseconds
- // [Default transitionDuration of DialogRoute]
+ // Wait for DialogRoute's default transition.
await Future.delayed(const Duration(milliseconds: 200));
if (_showLogs) debugPrint('ProgressDialog shown');
return true;
@@ -316,7 +315,6 @@ class _BodyState extends State<_Body> {
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
- // row body
Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
diff --git a/mobile/apps/photos/lib/ui/map/tile/attribution/map_attribution.dart b/mobile/apps/photos/lib/ui/map/tile/attribution/map_attribution.dart
index b1dabbdd2b..1c0509c7ff 100644
--- a/mobile/apps/photos/lib/ui/map/tile/attribution/map_attribution.dart
+++ b/mobile/apps/photos/lib/ui/map/tile/attribution/map_attribution.dart
@@ -11,85 +11,26 @@ import "package:photos/ui/components/buttons/icon_button_widget.dart";
// Credit: This code is based on the Rich Attribution widget from the flutter_map
class MapAttributionWidget extends StatefulWidget {
- /// List of attributions to display
- ///
- /// [TextSourceAttribution]s are shown in a popup box (toggled by a tap/click
- /// on the [openButton]/[closeButton]), unlike [LogoSourceAttribution], which
- /// are visible permanently adjacent to the open/close button.
final List<SourceAttribution> attributions;
- /// The position in which to anchor this widget
final AttributionAlignment alignment;
- /// The widget (usually an [IconButton]) to display when the popup box is
- /// closed, that opens the popup box via the `open` callback
final Widget Function(BuildContext context, VoidCallback open)? openButton;
- /// The widget (usually an [IconButton]) to display when the popup box is open,
- /// that closes the popup box via the `close` callback
final Widget Function(BuildContext context, VoidCallback close)? closeButton;
- /// The color to use as the popup box's background color, defaulting to the
- /// [Theme]s background color
final Color? popupBackgroundColor;
- /// The radius of the edges of the popup box
final BorderRadius? popupBorderRadius;
- /// The height of the permanent row in which is found the popup menu toggle
- /// button
- ///
- /// Also determines spacing between the items within the row.
- ///
- /// Also set [LogoSourceAttribution.height] to the same value, if adjusted.
final double permanentHeight;
- /// Whether to add an additional attribution logo and text for 'flutter_map'
final bool showFlutterMapAttribution;
- /// Animation configuration, through the properties and handler/builder
- /// defined by a [RichAttributionWidgetAnimation] implementation
- ///
- /// Can be extensivley customized by implementing a custom
- /// [RichAttributionWidgetAnimation], or the prebuilt [FadeRAWA] and
- /// [ScaleRAWA] animations can be used with limited customization.
final RichAttributionWidgetAnimation animationConfig;
- /// If not [Duration.zero] (default), the popup box will be open by default and
- /// hidden this long after the map is initialised
- ///
- /// This is useful with certain sources/tile servers that make immediate
- /// attribution mandatory and are not attributed with a permanently visible
- /// [LogoSourceAttribution].
final Duration popupInitialDisplayDuration;
- /// A prebuilt dynamic attribution layer that supports both logos and text
- /// through [SourceAttribution]s
- ///
- /// [TextSourceAttribution]s are shown in a popup box that can be visible or
- /// invisible. Its state is toggled by a tri-state [openButton]/[closeButton] :
- /// 1. Not hovered, not opened: faded button, invisible box
- /// 2. Hovered, not opened: full opacity button, invisible box
- /// 3. Opened: full opacity button, visible box
- ///
- /// The hover state on mobile devices is unspecified, but the behaviour is
- /// usually inconsequential on mobile devices anyway, due to the fingertip
- /// covering the entire button.
- ///
- /// [LogoSourceAttribution]s are shown adjacent to the open/close button, to
- /// comply with some stricter tile server requirements (such as Mapbox). These
- /// are usually supplemented with a [TextSourceAttribution].
- ///
- /// The popup box also closes automatically on any interaction with the map.
- ///
- /// Animations are built in by default, and configured/handled through
- /// [RichAttributionWidgetAnimation] - see that class and the [animationConfig]
- /// property for more information. By default, a simple fade/opacity animation
- /// is provided by [FadeRAWA]. [ScaleRAWA] is also available.
- ///
- /// Read the documentation on the individual properties for more information
- /// and customizability.
-
final double iconSize;
const MapAttributionWidget({
super.key,
diff --git a/mobile/apps/photos/lib/ui/payment/payment_web_page.dart b/mobile/apps/photos/lib/ui/payment/payment_web_page.dart
index 71d648d14b..6e09aa7c51 100644
--- a/mobile/apps/photos/lib/ui/payment/payment_web_page.dart
+++ b/mobile/apps/photos/lib/ui/payment/payment_web_page.dart
@@ -83,7 +83,6 @@ class _PaymentWebPageState extends State<PaymentWebPage> {
shouldOverrideUrlLoading: (controller, navigationAction) async {
final loadingUri = navigationAction.request.url;
_logger.info("Loading url $loadingUri");
- // handle the payment response
if (_isPaymentActionComplete(loadingUri)) {
await _handlePaymentResponse(loadingUri!);
return NavigationActionPolicy.CANCEL;
@@ -158,7 +157,6 @@ class _PaymentWebPageState extends State<PaymentWebPage> {
}
}
- // show dialog to handle accidental back press.
Future<bool> _buildPageExitWidget(BuildContext context) async {
final result = await showDialog(
useRootNavigator: false,
@@ -205,7 +203,6 @@ class _PaymentWebPageState extends State<PaymentWebPage> {
final reason = queryParams['reason'] ?? '';
await _handlePaymentFailure(reason);
} else {
- // should never reach here
_logger.severe("unexpected status", uri.toString());
await showGenericErrorDialog(
context: context,
@@ -238,7 +235,6 @@ class _PaymentWebPageState extends State<PaymentWebPage> {
Navigator.of(context).pop(true);
}
- // return true if verifySubscription didn't throw any exceptions
Future<void> _handlePaymentSuccess(Map<String, String> queryParams) async {
final checkoutSessionID = queryParams['session_id'] ?? '';
try {
@@ -267,7 +263,6 @@ class _PaymentWebPageState extends State<PaymentWebPage> {
}
}
- // warn the user to wait for sometime before trying another payment
Future<dynamic> _showExitPageDialog({String? title, String? content}) async {
if (!mounted) return null;
await showDialog(
diff --git a/mobile/apps/photos/lib/ui/payment/store_subscription_page.dart b/mobile/apps/photos/lib/ui/payment/store_subscription_page.dart
index b9ebe318c6..5bb762bfbc 100644
--- a/mobile/apps/photos/lib/ui/payment/store_subscription_page.dart
+++ b/mobile/apps/photos/lib/ui/payment/store_subscription_page.dart
@@ -61,10 +61,8 @@ class _StoreSubscriptionPageState extends State<StoreSubscriptionPage> {
EnteColorScheme colorScheme = darkScheme;
String? _selectedProductID;
- // hasYearlyPlans is used to check if there are yearly plans for given store
bool hasYearlyPlans = false;
- // _showYearlyPlan is used to determine if we should show the yearly plans
bool showYearlyPlan = false;
@override
diff --git a/mobile/apps/photos/lib/ui/payment/stripe_subscription_page.dart b/mobile/apps/photos/lib/ui/payment/stripe_subscription_page.dart
index 8cc2e318b8..c0c650c3f4 100644
--- a/mobile/apps/photos/lib/ui/payment/stripe_subscription_page.dart
+++ b/mobile/apps/photos/lib/ui/payment/stripe_subscription_page.dart
@@ -44,7 +44,6 @@ class _StripeSubscriptionPageState extends State<StripeSubscriptionPage> {
late ProgressDialog _dialog;
late UserDetails _userDetails;
- // indicates if user's subscription plan is still active
late bool _hasActiveSubscription;
bool _hideCurrentPlanSelection = false;
late FreePlan _freePlan;
@@ -97,7 +96,6 @@ class _StripeSubscriptionPageState extends State<StripeSubscriptionPage> {
});
}
- // _filterPlansForUI is used for initializing initState & plan toggle states
Future<void> _filterStripeForUI() async {
final billingPlans = await _billingService.getBillingPlans();
_freePlan = billingPlans.freePlan;
@@ -115,7 +113,6 @@ class _StripeSubscriptionPageState extends State<StripeSubscriptionPage> {
}
FutureOr onWebPaymentGoBack(dynamic value) async {
- // refresh subscription
await _dialog.show();
try {
await _fetchSub();
@@ -125,7 +122,6 @@ class _StripeSubscriptionPageState extends State<StripeSubscriptionPage> {
}
await _dialog.hide();
- // verify user has subscribed before redirecting to main page
if (widget.isOnboarding &&
_currentSubscription != null &&
_currentSubscription!.isValid() &&
@@ -303,7 +299,6 @@ class _StripeSubscriptionPageState extends State<StripeSubscriptionPage> {
);
}
- // only active subscription can be renewed/canceled
if (_hasActiveSubscription && _isStripeSubscriber) {
widgets.add(
Padding(
@@ -323,8 +318,6 @@ class _StripeSubscriptionPageState extends State<StripeSubscriptionPage> {
);
}
- // _redirectToPaymentPortal action allows the user to update
- // their stripe payment details
void _redirectToPaymentPortal() async {
final String paymentProvider = _currentSubscription!.paymentProvider;
switch (_currentSubscription!.paymentProvider) {
@@ -426,8 +419,6 @@ class _StripeSubscriptionPageState extends State<StripeSubscriptionPage> {
);
}
- // toggleStripeSubscription, based on current auto renew status, will
- // toggle the auto renew status of the user's subscription
Future<void> toggleStripeSubscription(bool isAutoRenewDisabled) async {
await _dialog.show();
try {
@@ -454,7 +445,6 @@ class _StripeSubscriptionPageState extends State<StripeSubscriptionPage> {
alwaysShowSuccessState: true,
textCapitalization: TextCapitalization.words,
onSubmit: (String text) async {
- // indicates user cancelled the rename request
if (text == "" || text.trim().isEmpty) {
return;
}
@@ -514,8 +504,6 @@ class _StripeSubscriptionPageState extends State<StripeSubscriptionPage> {
if (isActive) {
return;
}
- // prompt user to cancel their active subscription form other
- // payment providers
if (!_isStripeSubscriber &&
_hasActiveSubscription &&
_currentSubscription!.productID != freeProductID) {
@@ -547,7 +535,6 @@ class _StripeSubscriptionPageState extends State<StripeSubscriptionPage> {
}
String stripPurChaseAction = 'buy';
if (_isStripeSubscriber && _hasActiveSubscription) {
- // confirm if user wants to change plan or not
final result = await showChoiceDialog(
context,
title: context.strings.confirmPlanChange,
diff --git a/mobile/apps/photos/lib/ui/settings/backup/backup_folder_selection_page.dart b/mobile/apps/photos/lib/ui/settings/backup/backup_folder_selection_page.dart
index 8402d0f6e5..d2f913eb51 100644
--- a/mobile/apps/photos/lib/ui/settings/backup/backup_folder_selection_page.dart
+++ b/mobile/apps/photos/lib/ui/settings/backup/backup_folder_selection_page.dart
@@ -23,9 +23,6 @@ class BackupFolderSelectionPage extends StatefulWidget {
final bool isFirstBackup;
final bool isOnboarding;
- /// When true, skip the "only new backup" warning dialog.
- /// This is used when coming from the "backup only new photos" toggle
- /// to prevent recursive navigation back to backup settings.
final bool fromOnlyNewPhotosToggle;
const BackupFolderSelectionPage({
diff --git a/mobile/apps/photos/lib/ui/settings/cast/cast_settings_page.dart b/mobile/apps/photos/lib/ui/settings/cast/cast_settings_page.dart
index 816c61800a..6875eb034e 100644
--- a/mobile/apps/photos/lib/ui/settings/cast/cast_settings_page.dart
+++ b/mobile/apps/photos/lib/ui/settings/cast/cast_settings_page.dart
@@ -44,9 +44,7 @@ class CastSettingsPage extends StatelessWidget {
}
}
-/// Displays active cast sessions or the provided fallback when empty.
class CastSessionsList extends StatefulWidget {
- /// Creates a cast sessions list.
const CastSessionsList({
required this.showTitle,
required this.fallback,
@@ -54,10 +52,8 @@ class CastSessionsList extends StatefulWidget {
super.key,
});
- /// Whether to display the active sessions title.
final bool showTitle;
- /// Widget shown when there are no cast sessions.
final Widget fallback;
final List<CastInfo>? initialSessions;
diff --git a/mobile/apps/photos/lib/ui/settings/inherited_settings_state.dart b/mobile/apps/photos/lib/ui/settings/inherited_settings_state.dart
index 690d95247c..8cff13f888 100644
--- a/mobile/apps/photos/lib/ui/settings/inherited_settings_state.dart
+++ b/mobile/apps/photos/lib/ui/settings/inherited_settings_state.dart
@@ -1,6 +1,5 @@
import 'package:flutter/widgets.dart';
-/// StatefulWidget that wraps InheritedSettingsState
class SettingsStateContainer extends StatefulWidget {
const SettingsStateContainer({super.key, required this.child});
final Widget child;
@@ -35,16 +34,6 @@ class _SettingsState extends State<SettingsStateContainer> {
}
}
-/// Keep track of the number of expanded sections in an entire menu tree.
-///
-/// Since this is an InheritedWidget, subsections can obtain it from the context
-/// and use the current expansion state to style themselves differently if
-/// needed.
-///
-/// Example usage:
-///
-/// InheritedSettingsState.of(context).increment()
-///
class InheritedSettingsState extends InheritedWidget {
final int expandedSectionCount;
final void Function() increment;
diff --git a/mobile/apps/photos/lib/ui/settings/ml/machine_learning_settings_page.dart b/mobile/apps/photos/lib/ui/settings/ml/machine_learning_settings_page.dart
index 1cbe38f016..5f79389099 100644
--- a/mobile/apps/photos/lib/ui/settings/ml/machine_learning_settings_page.dart
+++ b/mobile/apps/photos/lib/ui/settings/ml/machine_learning_settings_page.dart
@@ -426,7 +426,6 @@ class _ModelLoadingStateState extends State<ModelLoadingState> {
);
},
),
- // show the progress map if in debug mode
..._progressMap.entries.map((entry) {
return Padding(
padding: const EdgeInsets.only(top: 8),
diff --git a/mobile/apps/photos/lib/ui/settings/search/settings_search_registry.dart b/mobile/apps/photos/lib/ui/settings/search/settings_search_registry.dart
index 54ec6bc9f6..ebcd959858 100644
--- a/mobile/apps/photos/lib/ui/settings/search/settings_search_registry.dart
+++ b/mobile/apps/photos/lib/ui/settings/search/settings_search_registry.dart
@@ -21,7 +21,6 @@ import "package:photos/ui/settings/streaming/video_streaming_settings_page.dart"
import "package:photos/ui/settings/support/help_support_page.dart";
import "package:photos/ui/settings/widget_settings_screen.dart";
-/// Registry that provides all searchable settings items
class SettingsSearchRegistry {
static List<SettingsSearchItem> getSearchableItems(BuildContext context) {
final l10n = context.strings;
@@ -30,7 +29,6 @@ class SettingsSearchRegistry {
final showThemeControls = Platform.isAndroid || kDebugMode;
final items = <SettingsSearchItem>[];
- // Account settings
if (hasLoggedIn && !isLocalGallery) {
items.add(
SettingsSearchItem(
@@ -100,7 +98,6 @@ class SettingsSearchRegistry {
]);
}
- // Backup settings
if (hasLoggedIn && !isLocalGallery) {
items.add(
SettingsSearchItem(
@@ -190,7 +187,6 @@ class SettingsSearchRegistry {
]);
}
- // Security settings
items.add(
SettingsSearchItem(
title: l10n.security,
@@ -273,7 +269,6 @@ class SettingsSearchRegistry {
),
]);
- // Appearance settings
items.add(
SettingsSearchItem(
title: l10n.appearance,
@@ -321,7 +316,6 @@ class SettingsSearchRegistry {
),
]);
- // Gallery settings (under Appearance)
items.add(
SettingsSearchItem(
title: l10n.gallery,
@@ -335,7 +329,6 @@ class SettingsSearchRegistry {
),
);
- // Grid Size setting
items.add(
SettingsSearchItem(
title: l10n.photoGridSize,
@@ -349,7 +342,6 @@ class SettingsSearchRegistry {
),
);
- // Group By setting
items.add(
SettingsSearchItem(
title: l10n.groupBy,
@@ -378,7 +370,6 @@ class SettingsSearchRegistry {
);
}
- // Machine Learning settings
if (hasLoggedIn || isLocalGallery) {
items.add(
SettingsSearchItem(
@@ -555,7 +546,6 @@ class SettingsSearchRegistry {
]);
}
- // Free up space
if (hasLoggedIn && !isLocalGallery) {
items.add(
SettingsSearchItem(
@@ -649,7 +639,6 @@ class SettingsSearchRegistry {
]);
}
- // Help & Support
items.add(
SettingsSearchItem(
title: l10n.helpAndSupport,
@@ -708,7 +697,6 @@ class SettingsSearchRegistry {
),
]);
- // About
items.add(
SettingsSearchItem(
title: l10n.about,
@@ -771,31 +759,26 @@ class SettingsSearchRegistry {
return items;
}
- /// Get suggestions shown when search is empty
static List<SettingsSearchSuggestion> getSuggestions(BuildContext context) {
final l10n = context.strings;
final hasLoggedIn = Configuration.instance.isLoggedIn();
final isLocalGallery = isLocalGalleryMode;
return [
- // Gallery suggestion
SettingsSearchSuggestion(
title: l10n.gallery,
routeBuilder: (_) =>
const GallerySettingsScreen(fromGalleryLayoutSettingsCTA: false),
),
- // App lock suggestion
SettingsSearchSuggestion(
title: l10n.appLock,
routeBuilder: (_) => const SecuritySettingsPage(),
),
- // Free up device space suggestion
if (hasLoggedIn && !isLocalGallery)
SettingsSearchSuggestion(
title: l10n.freeUpDeviceSpace,
routeBuilder: (_) => const FreeUpSpaceOptionsScreen(),
),
- // Backup settings suggestion
if (hasLoggedIn && !isLocalGallery)
SettingsSearchSuggestion(
title: l10n.backupSettings,
diff --git a/mobile/apps/photos/lib/ui/settings_page.dart b/mobile/apps/photos/lib/ui/settings_page.dart
index cfbeeab5fc..48c65cb1f4 100644
--- a/mobile/apps/photos/lib/ui/settings_page.dart
+++ b/mobile/apps/photos/lib/ui/settings_page.dart
@@ -101,7 +101,6 @@ class _SettingsBody extends StatelessWidget {
const SizedBox(height: 8),
],
if (hasLoggedIn && !isLocalGalleryMode) ...[
- // Account section
const StorageCardWidget(),
const SizedBox(height: 16),
_buildMenuItem(
@@ -121,7 +120,6 @@ class _SettingsBody extends StatelessWidget {
),
const SizedBox(height: 8),
],
- // Privacy and personalization section
_buildMenuItem(
title: context.strings.security,
icon: HugeIcons.strokeRoundedSecurityCheck,
@@ -139,21 +137,17 @@ class _SettingsBody extends StatelessWidget {
),
const SizedBox(height: 8),
if (isLocalGalleryMode) ...[
- // Local gallery section
_buildOfflineFeaturesCard(context),
const SizedBox(height: 8),
],
if (hasLoggedIn && !isLocalGalleryMode) ...[
- // Product features section
_buildPersonalFeaturesCard(context),
const SizedBox(height: 8),
_buildFeaturesAndPlansCard(context),
const SizedBox(height: 8),
],
- // Engagement section
AppEngagementSection(reviewUrl: ReviewService.url),
const SizedBox(height: 8),
- // Support section
_buildMenuItem(
title: context.strings.helpAndSupport,
icon: HugeIcons.strokeRoundedHelpCircle,
@@ -171,7 +165,6 @@ class _SettingsBody extends StatelessWidget {
),
const SizedBox(height: 8),
if (hasLoggedIn && !isLocalGalleryMode) ...[
- // Account actions section
_buildLogoutCard(context),
],
const Padding(
@@ -182,7 +175,6 @@ class _SettingsBody extends StatelessWidget {
if (hasLoggedIn &&
!isLocalGalleryMode &&
(flagService.flags.internalUser || kDebugMode)) ...[
- // Debug section
_buildMenuItem(
title: "Debug",
icon: HugeIcons.strokeRoundedBug02,
diff --git a/mobile/apps/photos/lib/ui/sharing/add_participant_page.dart b/mobile/apps/photos/lib/ui/sharing/add_participant_page.dart
index 325792357f..10e14e8f1d 100644
--- a/mobile/apps/photos/lib/ui/sharing/add_participant_page.dart
+++ b/mobile/apps/photos/lib/ui/sharing/add_participant_page.dart
@@ -17,7 +17,6 @@ import "package:photos/ui/sharing/verify_identity_dialog.dart";
enum ActionTypesToShow { addViewer, addCollaborator, addAdmin }
class AddParticipantPage extends StatefulWidget {
- /// Cannot be empty
final List<ActionTypesToShow> actionTypesToShow;
final List<Collection> collections;
@@ -36,7 +35,6 @@ class _AddParticipantPage extends State<AddParticipantPage> {
late CollectionActions collectionActions;
late List<UserSuggestion> _suggestedUsers;
- // Focus nodes are necessary
final textFieldFocusNode = FocusNode();
final _textController = TextEditingController();
diff --git a/mobile/apps/photos/lib/ui/sharing/library_sharing/library_sharing_page.dart b/mobile/apps/photos/lib/ui/sharing/library_sharing/library_sharing_page.dart
index f2132bf941..b0b4dfe7c3 100644
--- a/mobile/apps/photos/lib/ui/sharing/library_sharing/library_sharing_page.dart
+++ b/mobile/apps/photos/lib/ui/sharing/library_sharing/library_sharing_page.dart
@@ -455,8 +455,8 @@ class _LibrarySharingPageState extends State<LibrarySharingPage> {
}
}
-/// Positions the 250px empty state group at the reference screen's y=287.
-/// Source: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=17186-38829&m=dev
+// Positions the 250px empty state group at the reference screen's y=287.
+// Source: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=17186-38829&m=dev
const double _fullLibraryEmptyStateTopPadding = 131;
// Prevents the final grid row from jumping under the sheet before measurement.
diff --git a/mobile/apps/photos/lib/ui/sharing/verify_identity_dialog.dart b/mobile/apps/photos/lib/ui/sharing/verify_identity_dialog.dart
index 6d23a7d610..80b0c67c19 100644
--- a/mobile/apps/photos/lib/ui/sharing/verify_identity_dialog.dart
+++ b/mobile/apps/photos/lib/ui/sharing/verify_identity_dialog.dart
@@ -30,11 +30,8 @@ Future<void> showVerifyIdentitySheet(
}
class _VerifyIdentitySheetContent extends StatefulWidget {
- // email id of the user who's verification ID is being displayed for
- // verification
final String email;
- // self is true when the user is viewing their own verification ID
final bool self;
_VerifyIdentitySheetContent({required this.self, this.email = ''}) {
@@ -129,7 +126,6 @@ class _VerifyIdentitySheetContentState
widget.email,
);
if (userPublicKey == null) {
- // user not found
return "";
}
return userPublicKey;
diff --git a/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_configs_mixin.dart b/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_configs_mixin.dart
index f24d8f791d..8c73f7ebe8 100644
--- a/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_configs_mixin.dart
+++ b/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_configs_mixin.dart
@@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:pro_image_editor/core/mixins/converted_configs.dart';
import 'package:pro_image_editor/pro_image_editor.dart';
-/// A mixin providing access to simple editor configurations.
mixin SimpleConfigsAccess on StatefulWidget {
ProImageEditorConfigs get configs;
ProImageEditorCallbacks get callbacks;
diff --git a/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_constants.dart b/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_constants.dart
index c798b278b4..ccea7fcb4b 100644
--- a/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_constants.dart
+++ b/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_constants.dart
@@ -1,8 +1,5 @@
-/// The duration used for fade-in animations.
const fadeInDuration = Duration(milliseconds: 220);
-/// The stagger delay between multiple fade-in animations
const fadeInDelay = Duration(milliseconds: 25);
-/// The height of the sub-bar.
const editorBottomBarHeight = 180.0;
diff --git a/mobile/apps/photos/lib/ui/tools/similar_images_page.dart b/mobile/apps/photos/lib/ui/tools/similar_images_page.dart
index 1ec788328a..73264371e3 100644
--- a/mobile/apps/photos/lib/ui/tools/similar_images_page.dart
+++ b/mobile/apps/photos/lib/ui/tools/similar_images_page.dart
@@ -141,7 +141,6 @@ class _SimilarImagesPageState extends State<SimilarImagesPage> {
return Stack(
children: [
content,
- // Progress overlay
ValueListenableBuilder(
valueListenable: _deleteProgress,
builder: (context, value, child) {
@@ -1097,7 +1096,6 @@ class _SimilarImagesPageState extends State<SimilarImagesPage> {
if (!mounted) {
return;
}
- // Check permission before attempting to add symlinks
final collection = CollectionsService.instance.getCollectionByID(
collectionID,
);
@@ -1140,7 +1138,6 @@ class _SimilarImagesPageState extends State<SimilarImagesPage> {
if (!mounted) return;
await deleteFilesFromRemoteOnly(context, allDeleteFiles.toList());
- // Show congratulations popup
if (allDeleteFiles.length > 100 && mounted && showUIFeedback) {
final int totalSize = allDeleteFiles.fold<int>(
0,
@@ -1285,7 +1282,6 @@ class _LoadingScreenState extends State<_LoadingScreen> {
_currentTextIndex++;
});
}
- // Stop the timer when we reach the last text
if (_currentTextIndex >= _loadingTexts.length - 1) {
timer.cancel();
}
diff --git a/mobile/apps/photos/lib/ui/viewer/date/edit_date_sheet.dart b/mobile/apps/photos/lib/ui/viewer/date/edit_date_sheet.dart
index d5ce936924..220869cd2a 100644
--- a/mobile/apps/photos/lib/ui/viewer/date/edit_date_sheet.dart
+++ b/mobile/apps/photos/lib/ui/viewer/date/edit_date_sheet.dart
@@ -38,7 +38,6 @@ class EditDateSheet extends StatefulWidget {
}
class _EditDateSheetState extends State<EditDateSheet> {
- // Single date or shift date
bool showSingleOrShiftChoice = false;
bool selectSingleDate = false;
@@ -104,7 +103,6 @@ class _EditDateSheetState extends State<EditDateSheet> {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
- // Photo count and date range section
if (widget.showHeader)
PhotoDateHeaderWidget(
enteFiles: widget.enteFiles,
@@ -194,7 +192,6 @@ class _EditDateSheetState extends State<EditDateSheet> {
),
],
),
- // Bottom indicator line
const SizedBox(height: 20),
],
),
@@ -430,7 +427,6 @@ class SelectDateOrShiftWidget extends StatelessWidget {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
- // Select one date option
ListTile(
leading: Icon(
Icons.calendar_today_outlined,
@@ -456,7 +452,6 @@ class SelectDateOrShiftWidget extends StatelessWidget {
endIndent: 16,
height: 0.5,
),
- // Shift dates option
ListTile(
leading: Icon(
Icons.calendar_month_outlined,
@@ -508,7 +503,6 @@ class PhotoDateHeaderWidget extends StatelessWidget {
padding: const EdgeInsets.symmetric(vertical: 4),
child: Row(
children: [
- // Thumbnail
ClipRRect(
borderRadius: BorderRadius.circular(8),
child: SizedBox(
@@ -518,7 +512,6 @@ class PhotoDateHeaderWidget extends StatelessWidget {
),
),
const SizedBox(width: 16),
- // Photo count and date info
multipleFiles
? Expanded(
child: Column(
diff --git a/mobile/apps/photos/lib/ui/viewer/file/file_details_widget.dart b/mobile/apps/photos/lib/ui/viewer/file/file_details_widget.dart
index 170c2d0b41..08a4c5d563 100644
--- a/mobile/apps/photos/lib/ui/viewer/file/file_details_widget.dart
+++ b/mobile/apps/photos/lib/ui/viewer/file/file_details_widget.dart
@@ -219,45 +219,6 @@ class _FileDetailsWidgetState extends State<FileDetailsWidget> {
)
: const SizedBox.shrink();
- ///To be used when state issues are fixed when location is updated.
- //
- // file.fileType != FileType.video &&
- // file.ownerID == _currentUserID
- // ? Column(
- // children: [
- // InfoItemWidget(
- // leadingIcon: Icons.pin_drop_outlined,
- // title: "No location data",
- // subtitleSection: Future.value(
- // [
- // Text(
- // "Add location data",
- // style: getEnteTextTheme(context).miniBoldMuted,
- // ),
- // ],
- // ),
- // hasChipButtons: false,
- // onTap: () async {
- // await showBarModalBottomSheet(
- // shape: const RoundedRectangleBorder(
- // borderRadius: BorderRadius.vertical(
- // top: Radius.circular(5),
- // ),
- // ),
- // backgroundColor: getEnteColorScheme(context)
- // .backgroundElevated,
- // barrierColor: backdropFaintDark,
- // context: context,
- // builder: (context) {
- // return UpdateLocationDataWidget([file]);
- // },
- // );
- // },
- // ),
- // const FileDetailsDivider(),
- // ],
- // )
- // : const SizedBox.shrink();
},
),
]);
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/gallery.dart b/mobile/apps/photos/lib/ui/viewer/gallery/gallery.dart
index 54c50aa32e..27b2247ea1 100644
--- a/mobile/apps/photos/lib/ui/viewer/gallery/gallery.dart
+++ b/mobile/apps/photos/lib/ui/viewer/gallery/gallery.dart
@@ -176,7 +176,6 @@ class GalleryState extends State<Gallery> {
_automationScrollIdentifier = _buildAutomationScrollIdentifier(
widget.tagPrefix,
);
- // Avoid a trailing "." in the logger name.
_logTag =
"Gallery_${widget.tagPrefix}${kDebugMode ? "_" + widget.albumName! : ""}_x";
_logger = Logger(_logTag);
@@ -1046,7 +1045,6 @@ class _PinnedGroupHeaderState extends State<PinnedGroupHeader>
} else {
final groupScrollOffsets = widget.galleryGroups.groupScrollOffsets;
- // Find the last group whose offset is at or before the viewport.
int low = 0;
int high = groupScrollOffsets.length - 1;
int floorIndex = 0;