π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Prune mobile platform comments
Manav Rathia72b994c2bb4
diff --git a/mobile/analysis_options.yaml b/mobile/analysis_options.yamlindex 1b9c53a2b2..7f28d03648 100644--- a/mobile/analysis_options.yaml+++ b/mobile/analysis_options.yaml@@ -1,12 +1,6 @@-# For more linters, we can check https://dart-lang.github.io/linter/lints/index.html-# or https://pub.dev/packages/lint (Effective dart)-# use "flutter analyze ." or "dart analyze ." for running lint checks-include: package:flutter_lints/flutter.yamllinter:rules:- # Ref https://github.com/flutter/packages/blob/master/packages/flutter_lints/lib/flutter.yaml- # Ref https://dart-lang.github.io/linter/lints/- avoid_print- avoid_unnecessary_containers- avoid_web_libraries_in_flutter@@ -26,7 +20,6 @@ linter:- avoid_empty_else- exhaustive_cases- # just style suggestions- sort_pub_dependencies- use_rethrow_when_possible- prefer_double_quotesdiff --git a/mobile/apps/auth/analysis_options.yaml b/mobile/apps/auth/analysis_options.yamlindex 333c537330..7335f8e9d2 100644--- a/mobile/apps/auth/analysis_options.yaml+++ b/mobile/apps/auth/analysis_options.yaml@@ -1,11 +1,6 @@-# For more linters, we can check https://dart-lang.github.io/linter/lints/index.html-# or https://pub.dev/packages/lint (Effective dart)-# use "flutter analyze ." or "dart analyze ." for running lint checks-include: package:flutter_lints/flutter.yamllinter:rules:- # Ref https://github.com/flutter/packages/blob/master/packages/flutter_lints/lib/flutter.yaml- avoid_print- avoid_unnecessary_containers- avoid_web_libraries_in_flutter@@ -22,7 +17,6 @@ linter:- avoid_empty_else- exhaustive_cases- # just style suggestions- sort_pub_dependencies- use_rethrow_when_possible- directives_orderingdiff --git a/mobile/apps/auth/android/app/build.gradle b/mobile/apps/auth/android/app/build.gradleindex 40a32dd725..6b15beb23f 100644--- a/mobile/apps/auth/android/app/build.gradle+++ b/mobile/apps/auth/android/app/build.gradle@@ -34,9 +34,7 @@ android {ndkVersion "28.2.13676358"compileOptions {- // Flag to enable support for the new language APIscoreLibraryDesugaringEnabled true- // Sets Java compatibility to Java 8sourceCompatibility JavaVersion.VERSION_1_8targetCompatibility JavaVersion.VERSION_1_8}@@ -57,8 +55,6 @@ android {defaultConfig {applicationId "io.ente.auth"- // You can update the following values to match your application needs.- // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.minSdkVersion 24targetSdkVersion 36versionCode flutterVersionCode.toInteger()@@ -142,6 +138,5 @@ flutter {}dependencies {- // For AGP 7.4+coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4")}diff --git a/mobile/apps/auth/android/app/src/debug/AndroidManifest.xml b/mobile/apps/auth/android/app/src/debug/AndroidManifest.xmlindex 399f6981d5..bbd7ee7776 100644--- a/mobile/apps/auth/android/app/src/debug/AndroidManifest.xml+++ b/mobile/apps/auth/android/app/src/debug/AndroidManifest.xml@@ -1,7 +1,3 @@<manifest xmlns:android="http://schemas.android.com/apk/res/android">- <!-- The INTERNET permission is required for development. Specifically,- the Flutter tool needs it to communicate with the running application- to allow setting breakpoints, to provide hot reload, etc.- --><uses-permission android:name="android.permission.INTERNET"/></manifest>diff --git a/mobile/apps/auth/android/app/src/main/res/values-night-v31/styles.xml b/mobile/apps/auth/android/app/src/main/res/values-night-v31/styles.xmlindex 78866bf8bf..5372eef52a 100644--- a/mobile/apps/auth/android/app/src/main/res/values-night-v31/styles.xml+++ b/mobile/apps/auth/android/app/src/main/res/values-night-v31/styles.xml@@ -1,6 +1,5 @@<?xml version="1.0" encoding="utf-8"?><resources>- <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off --><style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar"><item name="android:forceDarkAllowed">false</item><item name="android:windowFullscreen">false</item>@@ -10,12 +9,6 @@<item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item><item name="android:windowSplashScreenIconBackgroundColor">#A75CFF</item></style>- <!-- Theme applied to the Android Window as soon as the process has started.- This theme determines the color of the Android Window while your- Flutter UI initializes, as well as behind your Flutter UI while its- running.-- This Theme is only used starting with V2 of Flutter's Android embedding. --><style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar"><item name="android:windowBackground">?android:colorBackground</item></style>diff --git a/mobile/apps/auth/android/app/src/main/res/values-night/styles.xml b/mobile/apps/auth/android/app/src/main/res/values-night/styles.xmlindex 7b20e158ca..86a149aa59 100644--- a/mobile/apps/auth/android/app/src/main/res/values-night/styles.xml+++ b/mobile/apps/auth/android/app/src/main/res/values-night/styles.xml@@ -1,21 +1,12 @@<?xml version="1.0" encoding="utf-8"?><resources>- <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on --><style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">- <!-- Show a splash screen on the activity. Automatically removed when- Flutter draws its first frame --><item name="android:windowBackground">@drawable/launch_background</item><item name="android:forceDarkAllowed">false</item><item name="android:windowFullscreen">false</item><item name="android:windowDrawsSystemBarBackgrounds">false</item><item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item></style>- <!-- Theme applied to the Android Window as soon as the process has started.- This theme determines the color of the Android Window while your- Flutter UI initializes, as well as behind your Flutter UI while its- running.-- This Theme is only used starting with V2 of Flutter's Android embedding. --><style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar"><item name="android:windowBackground">?android:colorBackground</item></style>diff --git a/mobile/apps/auth/android/app/src/main/res/values-v31/styles.xml b/mobile/apps/auth/android/app/src/main/res/values-v31/styles.xmlindex ab44d34f41..cd662b368a 100644--- a/mobile/apps/auth/android/app/src/main/res/values-v31/styles.xml+++ b/mobile/apps/auth/android/app/src/main/res/values-v31/styles.xml@@ -1,6 +1,5 @@<?xml version="1.0" encoding="utf-8"?><resources>- <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off --><style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar"><item name="android:forceDarkAllowed">false</item><item name="android:windowFullscreen">false</item>@@ -10,12 +9,6 @@<item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item><item name="android:windowSplashScreenIconBackgroundColor">#A75CFF</item></style>- <!-- Theme applied to the Android Window as soon as the process has started.- This theme determines the color of the Android Window while your- Flutter UI initializes, as well as behind your Flutter UI while its- running.-- This Theme is only used starting with V2 of Flutter's Android embedding. --><style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar"><item name="android:windowBackground">?android:colorBackground</item></style>diff --git a/mobile/apps/auth/android/app/src/main/res/values/styles.xml b/mobile/apps/auth/android/app/src/main/res/values/styles.xmlindex 4d705c74a9..6714d603ef 100644--- a/mobile/apps/auth/android/app/src/main/res/values/styles.xml+++ b/mobile/apps/auth/android/app/src/main/res/values/styles.xml@@ -1,8 +1,6 @@<?xml version="1.0" encoding="utf-8"?><resources><style name="LaunchTheme" parent="Theme.AppCompat.NoActionBar">- <!-- Show a splash screen on the activity. Automatically removed when- Flutter draws its first frame --><item name="android:windowBackground">@drawable/launch_background</item></style></resources>diff --git a/mobile/apps/auth/android/app/src/profile/AndroidManifest.xml b/mobile/apps/auth/android/app/src/profile/AndroidManifest.xmlindex 399f6981d5..bbd7ee7776 100644--- a/mobile/apps/auth/android/app/src/profile/AndroidManifest.xml+++ b/mobile/apps/auth/android/app/src/profile/AndroidManifest.xml@@ -1,7 +1,3 @@<manifest xmlns:android="http://schemas.android.com/apk/res/android">- <!-- The INTERNET permission is required for development. Specifically,- the Flutter tool needs it to communicate with the running application- to allow setting breakpoints, to provide hot reload, etc.- --><uses-permission android:name="android.permission.INTERNET"/></manifest>diff --git a/mobile/apps/auth/ios/Runner/AppDelegate.swift b/mobile/apps/auth/ios/Runner/AppDelegate.swiftindex f0a6599d7f..f79bd49f2a 100644--- a/mobile/apps/auth/ios/Runner/AppDelegate.swift+++ b/mobile/apps/auth/ios/Runner/AppDelegate.swift@@ -17,6 +17,5 @@ import app_linksreturn false- // return super.application(application, didFinishLaunchingWithOptions: launchOptions)}}diff --git a/mobile/apps/auth/lib/core/constants.dart b/mobile/apps/auth/lib/core/constants.dartindex 7f459a8abe..80effb883d 100644--- a/mobile/apps/auth/lib/core/constants.dart+++ b/mobile/apps/auth/lib/core/constants.dart@@ -16,7 +16,6 @@ const int android11SDKINT = 30;const int galleryLoadStartTime = -8000000000000000; // Wednesday, March 6, 1748const int galleryLoadEndTime = 9223372036854775807; // 2^63 -1-// used to identify which ente file are available in app cache// todo: 6Jun22: delete old media identifier after 3 monthsconst String oldSharedMediaIdentifier = 'ente-shared://';const String sharedMediaIdentifier = 'ente-shared-media://';diff --git a/mobile/apps/auth/lib/core/errors.dart b/mobile/apps/auth/lib/core/errors.dartindex 9e36301907..34e2d55c68 100644--- a/mobile/apps/auth/lib/core/errors.dart+++ b/mobile/apps/auth/lib/core/errors.dart@@ -16,7 +16,6 @@ class NoActiveSubscriptionError extends Error {}class StorageLimitExceededError extends Error {}-// error when file size + current usage >= storage plan limit + bufferclass FileTooLargeForPlanError extends Error {}class SilentlyCancelUploadsError extends Error {}diff --git a/mobile/apps/auth/lib/locale.dart b/mobile/apps/auth/lib/locale.dartindex cb17ae759b..8ee0e2f605 100644--- a/mobile/apps/auth/lib/locale.dart+++ b/mobile/apps/auth/lib/locale.dart@@ -1,7 +1,6 @@import 'package:flutter/cupertino.dart';import 'package:shared_preferences/shared_preferences.dart';-// list of locales which are enabled for auth app.// Add more language to the list only when at least 90% of the strings are// translated in the corresponding language.const List<Locale> appSupportedLocales = <Locale>[diff --git a/mobile/apps/auth/lib/models/authenticator/local_auth_entity.dart b/mobile/apps/auth/lib/models/authenticator/local_auth_entity.dartindex 373953d54c..723667a767 100644--- a/mobile/apps/auth/lib/models/authenticator/local_auth_entity.dart+++ b/mobile/apps/auth/lib/models/authenticator/local_auth_entity.dart@@ -59,7 +59,6 @@ class LocalAuthEntity {'header': header,'createdAt': createdAt,'updatedAt': updatedAt,- // sqlite doesn't support bool type. map true to 1 and false to 0'shouldSync': shouldSync ? 1 : 0,};}diff --git a/mobile/apps/auth/lib/models/code.dart b/mobile/apps/auth/lib/models/code.dartindex 70e3040540..4c47433713 100644--- a/mobile/apps/auth/lib/models/code.dart+++ b/mobile/apps/auth/lib/models/code.dart@@ -176,12 +176,9 @@ class Code {if (path.startsWith("/")) {path = path.substring(1, path.length);}- // Parse account name from documented auth URI- // otpauth://totp/ACCOUNT?secret=SUPERSECRET&issuer=SERVICEif (uri.queryParameters.containsKey("issuer") && !path.contains(":")) {return path;}- // handle case where issuer name contains colonif (path.startsWith('$issuer:')) {return path.substring(issuer.length + 1);}@@ -270,9 +267,7 @@ class Code {} else if (algorithm == "sha512" || "algorithm.sha512" == algorithm) {return Algorithm.sha512;}- } catch (e) {- // nothing- }+ } catch (e) {}return Algorithm.sha1;}diff --git a/mobile/apps/auth/lib/onboarding/view/onboarding_page.dart b/mobile/apps/auth/lib/onboarding/view/onboarding_page.dartindex 8d66cf9743..de5e98af6d 100644--- a/mobile/apps/auth/lib/onboarding/view/onboarding_page.dart+++ b/mobile/apps/auth/lib/onboarding/view/onboarding_page.dart@@ -311,7 +311,6 @@ class _OnboardingPageState extends State<OnboardingPage> {return;}- // Check if user is manually scrolling// userScrollDirection is idle during programmatic scrolling (animateToPage)// but becomes forward/reverse when user manually dragsif (_pageController.position.userScrollDirection != ScrollDirection.idle) {diff --git a/mobile/apps/auth/lib/services/preference_service.dart b/mobile/apps/auth/lib/services/preference_service.dartindex 86bbdeb02e..f81989a5da 100644--- a/mobile/apps/auth/lib/services/preference_service.dart+++ b/mobile/apps/auth/lib/services/preference_service.dart@@ -147,7 +147,6 @@ class PreferenceService {}}- // localEpochOffsetInMilliSecond returns the local epoch offset in milliseconds.// This is used to adjust the time for TOTP calculations when device local time is not in sync with actual time.int timeOffsetInMilliSeconds() {return _prefs.getInt(kLocalTimeOffsetKey) ?? 0;diff --git a/mobile/apps/auth/lib/ui/code_widget.dart b/mobile/apps/auth/lib/ui/code_widget.dartindex bda90deef5..ecb7784404 100644--- a/mobile/apps/auth/lib/ui/code_widget.dart+++ b/mobile/apps/auth/lib/ui/code_widget.dart@@ -133,7 +133,6 @@ class _CodeWidgetState extends State<CodeWidget> {_isInitialized = true;}final l10n = context.strings;- // Cache the localized error label for use in timer callbacks_errorText = l10n.error;Widget getCardContents(@@ -1123,7 +1122,6 @@ class _CodeWidgetState extends State<CodeWidget> {try {return getOTP(widget.code);} catch (e) {- // Avoid accessing BuildContext from async timer callbacksreturn _errorText;}}@@ -1133,7 +1131,6 @@ class _CodeWidgetState extends State<CodeWidget> {assert(widget.code.type.isTOTPCompatible);return getNextTotp(widget.code);} catch (e) {- // Avoid accessing BuildContext from async timer callbacksreturn _errorText;}}diff --git a/mobile/apps/auth/lib/ui/components/components_constants.dart b/mobile/apps/auth/lib/ui/components/components_constants.dartindex 2f8cbf52b1..5960fa4818 100644--- a/mobile/apps/auth/lib/ui/components/components_constants.dart+++ b/mobile/apps/auth/lib/ui/components/components_constants.dart@@ -1,4 +1,4 @@const double mobileSmallThreshold = 336;-//Screen width of iPhone 14 pro max in points is taken as maximum+// Cap layouts at the 430-point width of an iPhone 14 Pro Max.const double restrictedMaxWidth = 430;diff --git a/mobile/apps/auth/lib/ui/home_page.dart b/mobile/apps/auth/lib/ui/home_page.dartindex 7337071c4d..4f24adb81a 100644--- a/mobile/apps/auth/lib/ui/home_page.dart+++ b/mobile/apps/auth/lib/ui/home_page.dart@@ -1145,10 +1145,8 @@ class _HomePageState extends State<HomePage> {void _applyFilteringAndRefresh() {if (_searchText.isNotEmpty && _showSearchBox && _allCodes != null) {final String val = _searchText.toLowerCase();- // Prioritize issuer match above account for better UX while searching- // for a specific TOTP for email providers. Searching for "emailProvider" like (gmail, proton) should- // show the email provider first instead of other accounts where protonmail- // is the account name.+ // Show issuer matches first so searches for an email provider rank its+ // codes above accounts whose names happen to match.final List<Code> issuerMatch = [];final List<Code> accountMatch = [];final List<Code> noteMatch = [];diff --git a/mobile/apps/auth/lib/ui/scanner_gauth_page.dart b/mobile/apps/auth/lib/ui/scanner_gauth_page.dartindex 238a2de349..b578b8d14c 100644--- a/mobile/apps/auth/lib/ui/scanner_gauth_page.dart+++ b/mobile/apps/auth/lib/ui/scanner_gauth_page.dart@@ -21,8 +21,7 @@ class ScannerGoogleAuthPageState extends State<ScannerGoogleAuthPage> {StreamSubscription<String>? _scanSubscription;bool _hasCompletedScan = false;- // In order to get hot reload to work we need to pause the camera if the platform- // is android, or resume the camera if the platform is iOS.+ // Pause the camera on Android and resume it on iOS for hot reload.@overridevoid reassemble() {super.reassemble();diff --git a/mobile/apps/auth/lib/ui/scanner_page.dart b/mobile/apps/auth/lib/ui/scanner_page.dartindex a37f06e116..6a805766e3 100644--- a/mobile/apps/auth/lib/ui/scanner_page.dart+++ b/mobile/apps/auth/lib/ui/scanner_page.dart@@ -48,8 +48,7 @@ class ScannerPageState extends State<ScannerPage> {bool _isTogglingFlash = false;bool? _isFlashOn;- // In order to get hot reload to work we need to pause the camera if the platform- // is android, or resume the camera if the platform is iOS.+ // Pause the camera on Android and resume it on iOS for hot reload.@overridevoid reassemble() {super.reassemble();diff --git a/mobile/apps/auth/lib/ui/settings/data/import/andotp_import.dart b/mobile/apps/auth/lib/ui/settings/data/import/andotp_import.dartindex e7a7dd3c6a..8189443e71 100644--- a/mobile/apps/auth/lib/ui/settings/data/import/andotp_import.dart+++ b/mobile/apps/auth/lib/ui/settings/data/import/andotp_import.dart@@ -55,8 +55,7 @@ Future<int?> _processAndOTPFile() async {List<dynamic> entries;- // Try to detect if file is encrypted or plain text- // Plain text files are valid JSON arrays, encrypted files are binary+ // Valid JSON arrays are plain text; binary files need decryption.final Uint8List fileBytes = await readPickedImportFileAsBytes(path);try {diff --git a/mobile/apps/auth/lib/ui/settings/data/local_backup/local_backup_experience.dart b/mobile/apps/auth/lib/ui/settings/data/local_backup/local_backup_experience.dartindex 43ada7ebb5..ac39899764 100644--- a/mobile/apps/auth/lib/ui/settings/data/local_backup/local_backup_experience.dart+++ b/mobile/apps/auth/lib/ui/settings/data/local_backup/local_backup_experience.dart@@ -131,7 +131,7 @@ class _LocalBackupExperienceState extends State<LocalBackupExperience> {Future<bool> _startEnableFlow() async {final hasPassword = await _ensurePasswordConfigured(disableOnCancel: true);- // We only require a password to exist; re-enabling skips re-entry if already set.+ // Re-enabling needs an existing password but does not prompt for it again.if (!hasPassword) {return false;}@@ -180,7 +180,7 @@ class _LocalBackupExperienceState extends State<LocalBackupExperience> {return;}- // On iOS/macOS, check if we have a bookmark - if not, we need to re-pick+ // A saved path is unusable on iOS/macOS without its security bookmark.if (Platform.isIOS || Platform.isMacOS) {final prefs = await SharedPreferences.getInstance();final bookmark = prefs.getString(_iosBookmarkKey);@@ -261,8 +261,6 @@ class _LocalBackupExperienceState extends State<LocalBackupExperience> {return true;}- // On iOS/macOS, just check if we have a path configured.- // Directory creation happens in the backup service with proper scoped access.var resolvedPath = _backupPath;if (resolvedPath == null || resolvedPath.isEmpty) {final saved = await _pickAndSaveBackupLocation(@@ -274,8 +272,7 @@ class _LocalBackupExperienceState extends State<LocalBackupExperience> {}resolvedPath = _backupPath;}- // On iOS/macOS, don't try to create directory here - it requires scoped access- // which is handled by the backup service.+ // The backup service creates iOS/macOS directories with scoped access.if (!Platform.isIOS &&!Platform.isMacOS &&resolvedPath != null &&diff --git a/mobile/apps/auth/linux/my_application.cc b/mobile/apps/auth/linux/my_application.ccindex ad77a539bc..aba40ada7f 100644--- a/mobile/apps/auth/linux/my_application.cc+++ b/mobile/apps/auth/linux/my_application.cc@@ -51,7 +51,6 @@ static gboolean should_prefer_dark_theme()return g_strcmp0(color_scheme, "prefer-dark") == 0;}-// Implements GApplication::activate.static void my_application_activate(GApplication *application){MyApplication *self = MY_APPLICATION(application);@@ -66,13 +65,6 @@ static void my_application_activate(GApplication *application)GtkWindow *window =GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));- // Use a header bar when running in GNOME as this is the common style used- // by applications and is the setup most users will be using (e.g. Ubuntu- // desktop).- // If running on X and not using GNOME then just use a traditional title bar- // in case the window manager does more exotic layout, e.g. tiling.- // If running on Wayland assume the header bar will work (may need changing- // if future cases occur).gboolean use_header_bar = TRUE;#ifdef GDK_WINDOWING_X11@@ -90,8 +82,6 @@ static void my_application_activate(GApplication *application)#ifdef GDK_WINDOWING_WAYLANDGdkDisplay* display = gtk_widget_get_display(GTK_WIDGET(window));if (GDK_IS_WAYLAND_DISPLAY(display)) {- // Check the XDG_CURRENT_DESKTOP environment variable to determine the- // desktop environment.const gchar* current_desktop = g_getenv("XDG_CURRENT_DESKTOP");if (current_desktop != NULL && g_str_has_prefix(current_desktop, "GNOME")) {use_header_bar = TRUE;@@ -137,11 +127,9 @@ static void my_application_activate(GApplication *application)gtk_widget_grab_focus(GTK_WIDGET(view));}-// Implements GApplication::local_command_line.static gboolean my_application_local_command_line(GApplication *application, gchar ***arguments, int *exit_status){MyApplication *self = MY_APPLICATION(application);- // Strip out the first argument as it is the binary name.self->dart_entrypoint_arguments = g_strdupv(*arguments + 1);g_autoptr(GError) error = nullptr;@@ -158,27 +146,16 @@ static gboolean my_application_local_command_line(GApplication *application, gchreturn FALSE;}-// Implements GApplication::startup.static void my_application_startup(GApplication *application){- // MyApplication* self = MY_APPLICATION(object);-- // Perform any actions required at application startup.-G_APPLICATION_CLASS(my_application_parent_class)->startup(application);}-// Implements GApplication::shutdown.static void my_application_shutdown(GApplication *application){- // MyApplication* self = MY_APPLICATION(object);-- // Perform any actions required at application shutdown.-G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application);}-// Implements GObject::dispose.static void my_application_dispose(GObject *object){MyApplication *self = MY_APPLICATION(object);@@ -199,10 +176,7 @@ static void my_application_init(MyApplication *self) {}MyApplication *my_application_new(){- // Set the program name to the application ID, which helps various systems- // like GTK and desktop environments map this running application to its- // corresponding .desktop file. This ensures better integration by allowing- // the application to be recognized beyond its binary name.+ // Match the running process to its desktop file.g_set_prgname(APPLICATION_ID);return MY_APPLICATION(g_object_new(my_application_get_type(),diff --git a/mobile/apps/auth/linux/my_application.h b/mobile/apps/auth/linux/my_application.hindex 72271d5e41..d37b7963a9 100644--- a/mobile/apps/auth/linux/my_application.h+++ b/mobile/apps/auth/linux/my_application.h@@ -6,13 +6,6 @@G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION,GtkApplication)-/**- * my_application_new:- *- * Creates a new Flutter-based application.- *- * Returns: a new #MyApplication.- */MyApplication* my_application_new();#endif // FLUTTER_MY_APPLICATION_H_diff --git a/mobile/apps/auth/linux/packaging/appimage/make_config.yaml b/mobile/apps/auth/linux/packaging/appimage/make_config.yamlindex 5b39c7fd1f..b0cc70fdae 100644--- a/mobile/apps/auth/linux/packaging/appimage/make_config.yaml+++ b/mobile/apps/auth/linux/packaging/appimage/make_config.yaml@@ -18,11 +18,6 @@ categories:startup_notify: falsestartup_wm_class: io.ente.auth-# You can specify the shared libraries that you want to bundle with your app-#-# flutter_distributor automatically detects the shared libraries that your app-# depends on, but you can also specify them manually here.-## Bundled libp11-kit from the Ubuntu build depends on libffi.so.8.include:- libffi.so.8diff --git a/mobile/apps/auth/linux/packaging/build_rpm.sh b/mobile/apps/auth/linux/packaging/build_rpm.shindex 6f9ba7ce57..1a06ff701a 100755--- a/mobile/apps/auth/linux/packaging/build_rpm.sh+++ b/mobile/apps/auth/linux/packaging/build_rpm.sh@@ -2,21 +2,18 @@set -e-# Colors for outputRED='\033[0;31m'GREEN='\033[0;32m'YELLOW='\033[1;33m'-NC='\033[0m' # No Color+NC='\033[0m'echo -e "${GREEN}Building Ente Auth RPM package${NC}"-# Get script directory (location of this script)SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"cd "$PROJECT_ROOT"-# Extract version from pubspec.yamlFULL_VERSION=$(grep -E "^version:" pubspec.yaml | cut -d' ' -f2)VERSION=$(echo "$FULL_VERSION" | cut -d'+' -f1)if [ -z "$VERSION" ]; then@@ -27,18 +24,15 @@ fiecho -e "${YELLOW}Full Version: ${FULL_VERSION}${NC}"echo -e "${YELLOW}RPM Version: ${VERSION}${NC}"-# Define directoriesSTAGING_DIR="dist/rpm-staging"OUTPUT_DIR="dist/$FULL_VERSION"BUNDLE_DIR="build/linux/x64/release/bundle"-# Clean up any existing staging directoryif [ -d "$STAGING_DIR" ]; thenecho -e "${YELLOW}Cleaning existing staging directory...${NC}"rm -rf "$STAGING_DIR"fi-# Create staging directoriesecho -e "${YELLOW}Creating staging directories...${NC}"mkdir -p "$STAGING_DIR/usr/share/enteauth"mkdir -p "$STAGING_DIR/usr/share/metainfo"@@ -47,48 +41,38 @@ mkdir -p "$STAGING_DIR/usr/share/applications"mkdir -p "$STAGING_DIR/usr/share/polkit-1/actions"mkdir -p "$STAGING_DIR/usr/bin"-# Create output directorymkdir -p "$OUTPUT_DIR"-# Verify build directory existsif [ ! -d "$BUNDLE_DIR" ]; thenecho -e "${RED}Error: Build directory not found at $BUNDLE_DIR${NC}"echo -e "${YELLOW}Please run 'flutter build linux --release' first${NC}"exit 1fi-# Copy Flutter build filesecho -e "${YELLOW}Copying Flutter build files...${NC}"cp -r "$BUNDLE_DIR"/* "$STAGING_DIR/usr/share/enteauth/"-# Copy metainfo fileecho -e "${YELLOW}Copying metainfo file...${NC}"cp linux/packaging/enteauth.appdata.xml "$STAGING_DIR/usr/share/metainfo/"-# Copy iconecho -e "${YELLOW}Copying icon...${NC}"cp "assets/generation-icons/icon-windows-linux.png" "$STAGING_DIR/usr/share/pixmaps/io.ente.auth.png"-# Copy desktop fileecho -e "${YELLOW}Copying desktop file...${NC}"cp linux/packaging/enteauth.desktop "$STAGING_DIR/usr/share/applications/"-# Copy Polkit policy.echo -e "${YELLOW}Copying Polkit policy...${NC}"install -D -m 0644 assets/polkit/com.ente.auth.policy "$STAGING_DIR/usr/share/polkit-1/actions/com.ente.auth.policy"-# Create symlinkecho -e "${YELLOW}Creating symlink...${NC}"ln -s /usr/share/enteauth/enteauth "$STAGING_DIR/usr/bin/enteauth"-# Check if fpm is installedif ! command -v fpm &> /dev/null; thenecho -e "${RED}Error: fpm is not installed${NC}"echo -e "${YELLOW}Install it with: gem install fpm${NC}"exit 1fi-# Build RPM packageecho -e "${YELLOW}Building RPM package...${NC}"fpm -s dir -t rpm \-n enteauth \@@ -107,11 +91,9 @@ fpm -s dir -t rpm \-p "$OUTPUT_DIR/enteauth-VERSION.ARCH.rpm" \.-# Clean up staging directoryecho -e "${YELLOW}Cleaning up staging directory...${NC}"rm -rf "$STAGING_DIR"-# Display success messageRPM_FILE=$(ls "$OUTPUT_DIR"/enteauth-*.rpm 2>/dev/null | head -n1)if [ -f "$RPM_FILE" ]; thenRPM_SIZE=$(du -h "$RPM_FILE" | cut -f1)diff --git a/mobile/apps/auth/macos/packaging/dmg/make-dmg.sh b/mobile/apps/auth/macos/packaging/dmg/make-dmg.shindex 7a9191c6b3..3f2ec83546 100755--- a/mobile/apps/auth/macos/packaging/dmg/make-dmg.sh+++ b/mobile/apps/auth/macos/packaging/dmg/make-dmg.sh@@ -16,8 +16,6 @@ here=$(dirname "$0")tmp=$(mktemp -d)trap 'rm -rf "$tmp"' EXIT-# Stage the volume contents: the app, an /Applications link to drag it-# into, the Finder layout, and the volume icon.vol="$tmp/vol"mkdir "$vol" "$vol/.background"cp -R "$app" "$vol/Ente Auth.app"diff --git a/mobile/apps/auth/pubspec.yaml b/mobile/apps/auth/pubspec.yamlindex 28809163f2..db05955214 100644--- a/mobile/apps/auth/pubspec.yaml+++ b/mobile/apps/auth/pubspec.yaml@@ -147,12 +147,10 @@ dev_dependencies:qr: 3.0.2shared_preferences_platform_interface: 2.4.2-# The following section is specific to Flutter.flutter:uses-material-design: truegenerate: true- # https://docs:flutter:dev/development/ui/assets-and-images:assets:- assets/- assets/icons/@@ -179,7 +177,6 @@ flutter:fonts:- asset: fonts/Montserrat-Bold.ttf-# run "dart run flutter_launcher_icons" to generate iconsflutter_launcher_icons:image_path: "assets/generation-icons/icon-light.png"@@ -214,23 +211,8 @@ flutter_native_splash:ios: trueweb: falseandroid_12:- # The image parameter sets the splash screen icon image. If this parameter is not specified,- # the app's launcher icon will be used instead.- # Please note that the splash screen will be clipped to a circle on the center of the screen.- # App icon with an icon background: This should be 960Γ960 pixels, and fit within a circle- # 640 pixels in diameter.- # App icon without an icon background: This should be 1152Γ1152 pixels, and fit within a circle- # 768 pixels in diameter.image: "assets/generation-icons/splash-icon-ios-padded.png"-- # Splash screen background color.color: "#A75CFF"-- # App icon background color.icon_background_color: "#A75CFF"-- # The image_dark, color_dark, icon_background_color_dark, and branding_dark set values that- # apply when the device is in dark mode. If they are not specified, the app will use the- # parameters from above.color_dark: "#A75CFF"icon_background_color_dark: "#A75CFF"diff --git a/mobile/apps/auth/test/models/code_test.dart b/mobile/apps/auth/test/models/code_test.dartindex c42a041a14..79ce27b29b 100644--- a/mobile/apps/auth/test/models/code_test.dart+++ b/mobile/apps/auth/test/models/code_test.dart@@ -57,7 +57,6 @@ void main() {final secondDataToStore = restoredCode.toOTPAuthUrlFormat();expect(dataToStore, secondDataToStore);});- //test("parseWithFunnyAccountName", () {final code = Code.fromOTPAuthUrl(diff --git a/mobile/apps/auth/web/index.html b/mobile/apps/auth/web/index.htmlindex 097159f9ed..5e0b2e4801 100644--- a/mobile/apps/auth/web/index.html+++ b/mobile/apps/auth/web/index.html@@ -1,30 +1,15 @@<!DOCTYPE html><html><head>- <!--- If you are serving your web app in a path other than the root, change the- href value below to reflect the base path you are serving from.-- The path provided below has to start and end with a slash "/" in order for- it to work correctly.-- For more details:- * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base-- This is a placeholder for base href that will be replaced by the value of- the `--base-href` argument provided to `flutter build`.- --><base href="$FLUTTER_BASE_HREF"><meta charset="UTF-8"><meta content="IE=Edge" http-equiv="X-UA-Compatible"><meta name="description" content="A Very Good new Flutter project.">- <!-- iOS meta tags & icons --><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><meta name="apple-mobile-web-app-title" content="Auth"><link rel="apple-touch-icon" href="icons/Icon-192.png">- <!-- Favicon --><link rel="icon" type="image/png" href="favicon.png"><title>Auth</title>@@ -130,9 +115,6 @@- <!-- This script installs service_worker.js to provide PWA functionality to- application. For more information, see:- https://developers.google.com/web/fundamentals/primers/service-workers --><script>var serviceWorkerVersion = null;var scriptLoaded = false;@@ -148,7 +130,6 @@}if ('serviceWorker' in navigator) {- // Service workers are supported. Use them.window.addEventListener('load', function () {// Wait for registration to finish before dropping the <script> tag.// Otherwise, the browser will load the script multiple times,@@ -165,17 +146,12 @@});}if (!reg.active && (reg.installing || reg.waiting)) {- // No active web worker and we have installed or are installing- // one for the first time. Simply wait for it to activate.waitForActivation(reg.installing || reg.waiting);} else if (!reg.active.scriptURL.endsWith(serviceWorkerVersion)) {- // When the app updates the serviceWorkerVersion changes, so we- // need to ask the service worker to update.console.log('New service worker available.');reg.update();waitForActivation(reg.installing);} else {- // Existing service worker is still good.console.log('Loading app from service worker.');loadMainDartJs();}@@ -193,10 +169,9 @@}, 4000);});} else {- // Service workers not supported. Just drop the <script> tag.loadMainDartJs();}</script>-</body></html>\ No newline at end of file+</body></html>diff --git a/mobile/apps/auth/windows/runner/flutter_window.cpp b/mobile/apps/auth/windows/runner/flutter_window.cppindex 1672f9cbf7..385644274c 100644--- a/mobile/apps/auth/windows/runner/flutter_window.cpp+++ b/mobile/apps/auth/windows/runner/flutter_window.cpp@@ -20,7 +20,6 @@ bool FlutterWindow::OnCreate() {// creation / destruction in the startup path.flutter_controller_ = std::make_unique<flutter::FlutterViewController>(frame.right - frame.left, frame.bottom - frame.top, project_);- // Ensure that basic setup of the controller was successful.if (!flutter_controller_->engine() || !flutter_controller_->view()) {return false;}@@ -52,7 +51,6 @@ LRESULTFlutterWindow::MessageHandler(HWND hwnd, UINT const message,WPARAM const wparam,LPARAM const lparam) noexcept {- // Give Flutter, including plugins, an opportunity to handle window messages.if (flutter_controller_) {std::optional<LRESULT> result =flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam,diff --git a/mobile/apps/auth/windows/runner/flutter_window.h b/mobile/apps/auth/windows/runner/flutter_window.hindex 6da0652f05..d204fc4b5f 100644--- a/mobile/apps/auth/windows/runner/flutter_window.h+++ b/mobile/apps/auth/windows/runner/flutter_window.h@@ -8,25 +8,20 @@#include "win32_window.h"-// A window that does nothing but host a Flutter view.class FlutterWindow : public Win32Window {public:- // Creates a new FlutterWindow hosting a Flutter view running |project|.explicit FlutterWindow(const flutter::DartProject& project);virtual ~FlutterWindow();protected:- // Win32Window:bool OnCreate() override;void OnDestroy() override;LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam,LPARAM const lparam) noexcept override;private:- // The project to run.flutter::DartProject project_;- // The Flutter instance hosted by this window.std::unique_ptr<flutter::FlutterViewController> flutter_controller_;};diff --git a/mobile/apps/auth/windows/runner/main.cpp b/mobile/apps/auth/windows/runner/main.cppindex 6685d28c0a..400c00e31c 100644--- a/mobile/apps/auth/windows/runner/main.cpp+++ b/mobile/apps/auth/windows/runner/main.cpp@@ -5,19 +5,15 @@#include "flutter_window.h"#include "utils.h"-// [app_links]#include "app_links/app_links_plugin_c_api.h"bool SendAppLinkToInstance(const std::wstring &title){- // Find our exact windowHWND hwnd = ::FindWindow(L"FLUTTER_RUNNER_WIN32_WINDOW", title.c_str());if (hwnd){- // Dispatch new link to current windowSendAppLink(hwnd);- // (Optional) Restore our window to front in same stateWINDOWPLACEMENT place = {sizeof(WINDOWPLACEMENT)};GetWindowPlacement(hwnd, &place);@@ -36,9 +32,7 @@ bool SendAppLinkToInstance(const std::wstring &title)SetWindowPos(0, HWND_TOP, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE);SetForegroundWindow(hwnd);- // END Restore- // Window has been found, don't create another one.return true;}@@ -48,20 +42,15 @@ bool SendAppLinkToInstance(const std::wstring &title)int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,_In_ wchar_t *command_line, _In_ int show_command){- // [app_links]if (SendAppLinkToInstance(L"Ente Auth")){return EXIT_SUCCESS;}- // Attach to console when present (e.g., 'flutter run') or create a- // new console when running with a debugger.if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()){CreateAndAttachConsole();}- // Initialize COM, so that it is available for use in the library and/or- // plugins.::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);flutter::DartProject project(L"data");diff --git a/mobile/apps/auth/windows/runner/utils.cpp b/mobile/apps/auth/windows/runner/utils.cppindex b2b08734db..13b0a3707b 100644--- a/mobile/apps/auth/windows/runner/utils.cpp+++ b/mobile/apps/auth/windows/runner/utils.cpp@@ -22,7 +22,6 @@ void CreateAndAttachConsole() {}std::vector<std::string> GetCommandLineArguments() {- // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use.int argc;wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc);if (argv == nullptr) {@@ -31,7 +30,6 @@ std::vector<std::string> GetCommandLineArguments() {std::vector<std::string> command_line_arguments;- // Skip the first argument as it's the binary name.for (int i = 1; i < argc; i++) {command_line_arguments.push_back(Utf8FromUtf16(argv[i]));}diff --git a/mobile/apps/auth/windows/runner/utils.h b/mobile/apps/auth/windows/runner/utils.hindex 3879d54755..9627f28266 100644--- a/mobile/apps/auth/windows/runner/utils.h+++ b/mobile/apps/auth/windows/runner/utils.h@@ -4,16 +4,10 @@#include <string>#include <vector>-// Creates a console for the process, and redirects stdout and stderr to-// it for both the runner and the Flutter library.void CreateAndAttachConsole();-// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string-// encoded in UTF-8. Returns an empty std::string on failure.std::string Utf8FromUtf16(const wchar_t* utf16_string);-// Gets the command line arguments passed in as a std::vector<std::string>,-// encoded in UTF-8. Returns an empty std::vector<std::string> on failure.std::vector<std::string> GetCommandLineArguments();#endif // RUNNER_UTILS_H_diff --git a/mobile/apps/auth/windows/runner/win32_window.cpp b/mobile/apps/auth/windows/runner/win32_window.cppindex d3e9d1c60a..6eb4a29496 100644--- a/mobile/apps/auth/windows/runner/win32_window.cpp+++ b/mobile/apps/auth/windows/runner/win32_window.cpp@@ -8,39 +8,28 @@namespace{-/// Window attribute that enables dark mode window decorations.-///-/// Redefined in case the developer's machine has a Windows SDK older than-/// version 10.0.22000.0.-/// See: https://docs.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute+// Windows SDKs older than 10.0.22000.0 lack this definition.+// https://docs.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute#ifndef DWMWA_USE_IMMERSIVE_DARK_MODE#define DWMWA_USE_IMMERSIVE_DARK_MODE 20#endifconstexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW";- /// Registry key for app theme preference.- ///- /// A value of 0 indicates apps should use dark mode. A non-zero or missing- /// value indicates apps should use light mode.+ // Zero means dark mode; a nonzero or missing value means light mode.constexpr const wchar_t kGetPreferredBrightnessRegKey[] =L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize";constexpr const wchar_t kGetPreferredBrightnessRegValue[] = L"AppsUseLightTheme";- // The number of Win32Window objects that currently exist.static int g_active_window_count = 0;using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd);- // Scale helper to convert logical scaler values to physical using passed in- // scale factorint Scale(int source, double scale_factor){return static_cast<int>(source * scale_factor);}- // Dynamically loads the |EnableNonClientDpiScaling| from the User32 module.- // This API is only needed for PerMonitor V1 awareness mode.void EnableFullDpiSupportIfAvailable(HWND hwnd){HMODULE user32_module = LoadLibraryA("User32.dll");@@ -60,13 +49,11 @@ namespace} // namespace-// Manages the Win32Window's window class registration.class WindowClassRegistrar{public:~WindowClassRegistrar() = default;- // Returns the singleton registrar instance.static WindowClassRegistrar *GetInstance(){if (!instance_)@@ -76,12 +63,8 @@ public:return instance_;}- // Returns the name of the window class, registering the class if it hasn't- // previously been registered.const wchar_t *GetWindowClass();- // Unregisters the window class. Should only be called if there are no- // instances of the window.void UnregisterWindowClass();private:@@ -170,7 +153,6 @@ bool Win32Window::Show()return ShowWindow(window_handle_, SW_SHOWNORMAL);}-// staticLRESULT CALLBACK Win32Window::WndProc(HWND const window,UINT const message,WPARAM const wparam,@@ -227,7 +209,6 @@ Win32Window::MessageHandler(HWND hwnd,RECT rect = GetClientArea();if (child_content_ != nullptr){- // Size and position the child window.MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left,rect.bottom - rect.top, TRUE);}@@ -301,13 +282,11 @@ void Win32Window::SetQuitOnClose(bool quit_on_close)bool Win32Window::OnCreate(){- // No-op; provided for subclasses.return true;}void Win32Window::OnDestroy(){- // No-op; provided for subclasses.}void Win32Window::UpdateTheme(HWND const window)diff --git a/mobile/apps/auth/windows/runner/win32_window.h b/mobile/apps/auth/windows/runner/win32_window.hindex e3745cd060..dd39cd588b 100644--- a/mobile/apps/auth/windows/runner/win32_window.h+++ b/mobile/apps/auth/windows/runner/win32_window.h@@ -7,9 +7,6 @@#include <memory>#include <string>-// A class abstraction for a high DPI-aware Win32 Window. Intended to be-// inherited from by classes that wish to specialize with custom-// rendering and input handlingclass Win32Window{public:@@ -31,74 +28,46 @@ public:Win32Window();virtual ~Win32Window();- // Creates a win32 window with |title| that is positioned and sized using- // |origin| and |size|. New windows are created on the default monitor. Window- // sizes are specified to the OS in physical pixels, hence to ensure a- // consistent size this function will scale the inputted width and height as- // as appropriate for the default monitor. The window is invisible until- // |Show| is called. Returns true if the window was created successfully.bool Create(const std::wstring &title, const Point &origin, const Size &size);- // Show the current window. Returns true if the window was successfully shown.bool Show();- // Release OS resources associated with window.void Destroy();- // Inserts |content| into the window tree.void SetChildContent(HWND content);- // Returns the backing Window handle to enable clients to set icon and other- // window properties. Returns nullptr if the window has been destroyed.HWND GetHandle();- // If true, closing this window will quit the application.void SetQuitOnClose(bool quit_on_close);- // Return a RECT representing the bounds of the current client area.RECT GetClientArea();protected:- // Processes and route salient window messages for mouse handling,- // size change and DPI. Delegates handling of these to member overloads that- // inheriting classes can handle.virtual LRESULT MessageHandler(HWND window,UINT const message,WPARAM const wparam,LPARAM const lparam) noexcept;- // Called when CreateAndShow is called, allowing subclass window-related- // setup. Subclasses should return false if setup fails.virtual bool OnCreate();- // Called when Destroy is called.virtual void OnDestroy();private:friend class WindowClassRegistrar;- // OS callback called by message pump. Handles the WM_NCCREATE message which- // is passed when the non-client area is being created and enables automatic- // non-client DPI scaling so that the non-client area automatically- // responds to changes in DPI. All other messages are handled by- // MessageHandler.static LRESULT CALLBACK WndProc(HWND const window,UINT const message,WPARAM const wparam,LPARAM const lparam) noexcept;- // Retrieves a class instance pointer for |window|static Win32Window *GetThisFromHandle(HWND const window) noexcept;- // Update the window frame's theme to match the system theme.static void UpdateTheme(HWND const window);bool quit_on_close_ = false;- // window handle for top level window.HWND window_handle_ = nullptr;- // window handle for hosted content.HWND child_content_ = nullptr;};diff --git a/mobile/apps/locker/android/app/src/debug/AndroidManifest.xml b/mobile/apps/locker/android/app/src/debug/AndroidManifest.xmlindex 399f6981d5..bbd7ee7776 100644--- a/mobile/apps/locker/android/app/src/debug/AndroidManifest.xml+++ b/mobile/apps/locker/android/app/src/debug/AndroidManifest.xml@@ -1,7 +1,3 @@<manifest xmlns:android="http://schemas.android.com/apk/res/android">- <!-- The INTERNET permission is required for development. Specifically,- the Flutter tool needs it to communicate with the running application- to allow setting breakpoints, to provide hot reload, etc.- --><uses-permission android:name="android.permission.INTERNET"/></manifest>diff --git a/mobile/apps/locker/android/app/src/main/AndroidManifest.xml b/mobile/apps/locker/android/app/src/main/AndroidManifest.xmlindex d269fb342f..ceffd1f6f8 100644--- a/mobile/apps/locker/android/app/src/main/AndroidManifest.xml+++ b/mobile/apps/locker/android/app/src/main/AndroidManifest.xml@@ -1,9 +1,7 @@<manifest xmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools">- <!-- Camera permissions for document scanner --><uses-permission android:name="android.permission.CAMERA" />- <!-- Storage permissions for saving files --><uses-permissionandroid:name="android.permission.READ_EXTERNAL_STORAGE"android:maxSdkVersion="32" />@@ -31,10 +29,6 @@android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"android:hardwareAccelerated="true"android:windowSoftInputMode="adjustResize">- <!-- Specifies an Android theme to apply to this Activity as soon as- the Android process has started. This theme is visible to the user- while the Flutter UI initializes. After that, this theme continues- to determine the Window background behind the Flutter UI. --><meta-dataandroid:name="io.flutter.embedding.android.NormalTheme"android:resource="@style/NormalTheme"diff --git a/mobile/apps/locker/android/app/src/main/res/values-night-v31/styles.xml b/mobile/apps/locker/android/app/src/main/res/values-night-v31/styles.xmlindex b2f5a775f5..1fddd76587 100644--- a/mobile/apps/locker/android/app/src/main/res/values-night-v31/styles.xml+++ b/mobile/apps/locker/android/app/src/main/res/values-night-v31/styles.xml@@ -1,6 +1,5 @@<?xml version="1.0" encoding="utf-8"?><resources>- <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on --><style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar"><item name="android:forceDarkAllowed">false</item><item name="android:windowFullscreen">false</item>@@ -10,12 +9,6 @@<item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item><item name="android:windowSplashScreenIconBackgroundColor">#000000</item></style>- <!-- Theme applied to the Android Window as soon as the process has started.- This theme determines the color of the Android Window while your- Flutter UI initializes, as well as behind your Flutter UI while its- running.-- This Theme is only used starting with V2 of Flutter's Android embedding. --><style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar"><item name="android:windowBackground">?android:colorBackground</item></style>diff --git a/mobile/apps/locker/android/app/src/main/res/values-night/styles.xml b/mobile/apps/locker/android/app/src/main/res/values-night/styles.xmlindex dbc9ea9f1b..86a149aa59 100644--- a/mobile/apps/locker/android/app/src/main/res/values-night/styles.xml+++ b/mobile/apps/locker/android/app/src/main/res/values-night/styles.xml@@ -1,21 +1,12 @@<?xml version="1.0" encoding="utf-8"?><resources>- <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on --><style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">- <!-- Show a splash screen on the activity. Automatically removed when- the Flutter engine draws its first frame --><item name="android:windowBackground">@drawable/launch_background</item><item name="android:forceDarkAllowed">false</item><item name="android:windowFullscreen">false</item><item name="android:windowDrawsSystemBarBackgrounds">false</item><item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item></style>- <!-- Theme applied to the Android Window as soon as the process has started.- This theme determines the color of the Android Window while your- Flutter UI initializes, as well as behind your Flutter UI while its- running.-- This Theme is only used starting with V2 of Flutter's Android embedding. --><style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar"><item name="android:windowBackground">?android:colorBackground</item></style>diff --git a/mobile/apps/locker/android/app/src/main/res/values-v31/styles.xml b/mobile/apps/locker/android/app/src/main/res/values-v31/styles.xmlindex 8012d02cf3..b2380e9bd0 100644--- a/mobile/apps/locker/android/app/src/main/res/values-v31/styles.xml+++ b/mobile/apps/locker/android/app/src/main/res/values-v31/styles.xml@@ -1,6 +1,5 @@<?xml version="1.0" encoding="utf-8"?><resources>- <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off --><style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar"><item name="android:forceDarkAllowed">false</item><item name="android:windowFullscreen">false</item>@@ -10,12 +9,6 @@<item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item><item name="android:windowSplashScreenIconBackgroundColor">#FFFFFF</item></style>- <!-- Theme applied to the Android Window as soon as the process has started.- This theme determines the color of the Android Window while your- Flutter UI initializes, as well as behind your Flutter UI while its- running.-- This Theme is only used starting with V2 of Flutter's Android embedding. --><style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar"><item name="android:windowBackground">?android:colorBackground</item></style>diff --git a/mobile/apps/locker/android/app/src/main/res/values/styles.xml b/mobile/apps/locker/android/app/src/main/res/values/styles.xmlindex 0d1fa8fce8..e4a5bab44c 100644--- a/mobile/apps/locker/android/app/src/main/res/values/styles.xml+++ b/mobile/apps/locker/android/app/src/main/res/values/styles.xml@@ -1,21 +1,12 @@<?xml version="1.0" encoding="utf-8"?><resources>- <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off --><style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">- <!-- Show a splash screen on the activity. Automatically removed when- the Flutter engine draws its first frame --><item name="android:windowBackground">@drawable/launch_background</item><item name="android:forceDarkAllowed">false</item><item name="android:windowFullscreen">false</item><item name="android:windowDrawsSystemBarBackgrounds">false</item><item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item></style>- <!-- Theme applied to the Android Window as soon as the process has started.- This theme determines the color of the Android Window while your- Flutter UI initializes, as well as behind your Flutter UI while its- running.-- This Theme is only used starting with V2 of Flutter's Android embedding. --><style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar"><item name="android:windowBackground">?android:colorBackground</item></style>diff --git a/mobile/apps/locker/android/app/src/profile/AndroidManifest.xml b/mobile/apps/locker/android/app/src/profile/AndroidManifest.xmlindex 399f6981d5..bbd7ee7776 100644--- a/mobile/apps/locker/android/app/src/profile/AndroidManifest.xml+++ b/mobile/apps/locker/android/app/src/profile/AndroidManifest.xml@@ -1,7 +1,3 @@<manifest xmlns:android="http://schemas.android.com/apk/res/android">- <!-- The INTERNET permission is required for development. Specifically,- the Flutter tool needs it to communicate with the running application- to allow setting breakpoints, to provide hot reload, etc.- --><uses-permission android:name="android.permission.INTERNET"/></manifest>diff --git a/mobile/apps/locker/ios/RunnerTests/RunnerTests.swift b/mobile/apps/locker/ios/RunnerTests/RunnerTests.swiftindex 86a7c3b1b6..8324d0b0be 100644--- a/mobile/apps/locker/ios/RunnerTests/RunnerTests.swift+++ b/mobile/apps/locker/ios/RunnerTests/RunnerTests.swift@@ -5,8 +5,6 @@ import XCTestclass RunnerTests: XCTestCase {func testExample() {- // If you add code to the Runner application, consider adding tests here.- // See https://developer.apple.com/documentation/xctest for more information about using XCTest.}}diff --git a/mobile/apps/locker/ios/Share Extension/ShareViewController.swift b/mobile/apps/locker/ios/Share Extension/ShareViewController.swiftindex f5aabe3e2a..c212321530 100644--- a/mobile/apps/locker/ios/Share Extension/ShareViewController.swift+++ b/mobile/apps/locker/ios/Share Extension/ShareViewController.swift@@ -2,8 +2,6 @@ import listen_sharing_intentclass ShareViewController: RSIShareViewController {- // Use this method to return false if you don't want to redirect to host app automatically.- // Default is trueoverride func shouldAutoRedirect() -> Bool {return true}diff --git a/mobile/apps/locker/lib/core/errors.dart b/mobile/apps/locker/lib/core/errors.dartindex 13f4dcf015..fa217e8bf2 100644--- a/mobile/apps/locker/lib/core/errors.dart+++ b/mobile/apps/locker/lib/core/errors.dart@@ -12,7 +12,6 @@ class NoActiveSubscriptionError extends Error {}class FileLimitReachedError extends Error {}-// error when file size + current usage >= storage plan limit + bufferclass FileTooLargeForPlanError extends Error {}class WiFiUnavailableError extends Error {}diff --git a/mobile/apps/locker/lib/core/locale.dart b/mobile/apps/locker/lib/core/locale.dartindex e048e616ec..bcece4ee4a 100644--- a/mobile/apps/locker/lib/core/locale.dart+++ b/mobile/apps/locker/lib/core/locale.dart@@ -1,7 +1,6 @@import 'package:flutter/cupertino.dart';import 'package:shared_preferences/shared_preferences.dart';-// list of locales which are enabled for locker app.// Add more language to the list only when at least 90% of the strings are// translated in the corresponding language.const List<Locale> appSupportedLocales = <Locale>[diff --git a/mobile/apps/locker/lib/services/collections/collections_api_client.dart b/mobile/apps/locker/lib/services/collections/collections_api_client.dartindex 2e6d7a8581..abf23f7537 100644--- a/mobile/apps/locker/lib/services/collections/collections_api_client.dart+++ b/mobile/apps/locker/lib/services/collections/collections_api_client.dart@@ -111,7 +111,6 @@ class CollectionApiClient {for (final file in files) {final int uploadedFileID = file.uploadedFileID!;- // Follow Photos pattern: decrypt using file's current collectionIDfinal fileCurrentCollection = await CollectionService.instance.getCollection(file.collectionID!);final fileCurrentCollectionKey = CryptoHelper.instance.getCollectionKey(@@ -123,7 +122,6 @@ class CollectionApiClient {fileCurrentCollectionKey,);- // Re-encrypt the file key with the destination collection's keyfinal encryptedKeyData = CryptoUtil.encryptSync(fileKey, collectionKey);final String encryptedKey = CryptoUtil.bin2base64(encryptedKeyData.encryptedData!,@@ -254,7 +252,6 @@ class CollectionApiClient {for (final batch in batchedFiles) {params["files"] = [];for (final file in batch) {- // Follow Photos pattern: use file's collectionID to get the keyfinal fileCollection = await CollectionService.instance.getCollection(file.collectionID!,);@@ -269,7 +266,6 @@ class CollectionApiClient {file.collectionID = toCollection.id;- // Re-encrypt the file key with the destination collection's keyfinal destCollectionKey = CryptoHelper.instance.getCollectionKey(toCollection,);diff --git a/mobile/apps/locker/lib/services/collections/collections_service.dart b/mobile/apps/locker/lib/services/collections/collections_service.dartindex 76129985cf..e413d9bebc 100644--- a/mobile/apps/locker/lib/services/collections/collections_service.dart+++ b/mobile/apps/locker/lib/services/collections/collections_service.dart@@ -649,9 +649,6 @@ class CollectionService {in destCollectionToFilesMap.entries) {if (collection.type == CollectionType.uncategorized &&entry.key == collection.id) {- // skip moving files to uncategorized collection from uncategorized- // this flow is triggered while cleaning up uncategerized collection-_logger.info('skipping moving ${entry.value.length} files to uncategorized collection',);diff --git a/mobile/apps/locker/lib/services/files/sync/models/file_magic.dart b/mobile/apps/locker/lib/services/files/sync/models/file_magic.dartindex 43ddd02ef4..8f94103bfa 100644--- a/mobile/apps/locker/lib/services/files/sync/models/file_magic.dart+++ b/mobile/apps/locker/lib/services/files/sync/models/file_magic.dart@@ -49,7 +49,6 @@ class PubMagicMetadata {double? lat;double? long;- // Indicates streaming version of the file.// If this is set, then the file is a streaming version of the original file.int? sv;diff --git a/mobile/apps/locker/lib/services/info_file_service.dart b/mobile/apps/locker/lib/services/info_file_service.dartindex 7f7a2b778e..6c21c11c52 100644--- a/mobile/apps/locker/lib/services/info_file_service.dart+++ b/mobile/apps/locker/lib/services/info_file_service.dart@@ -58,7 +58,6 @@ class InfoFileService {final Map<String, dynamic> metadataUpdates = {infoKey: infoData};- // Update title if it's different from current display name// Use displayName (which considers editedName) instead of title (original name)final updatedTitle = getInfoFileTitle(updatedInfoItem);if (existingFile.displayName != updatedTitle) {diff --git a/mobile/apps/locker/lib/utils/crypto_helper.dart b/mobile/apps/locker/lib/utils/crypto_helper.dartindex e0231a0286..e91e1e0621 100644--- a/mobile/apps/locker/lib/utils/crypto_helper.dart+++ b/mobile/apps/locker/lib/utils/crypto_helper.dart@@ -22,7 +22,6 @@ class CryptoHelper {final encryptedKey = CryptoUtil.base642bin(collection.encryptedKey);Uint8List? collectionKey;if (collection.owner.id == Configuration.instance.getUserID()) {- // If the collection is owned by the user, decrypt with the master keyif (Configuration.instance.getKey() == null) {// Possible during AppStore account migration, where SecureStorage// would become inaccessible to the new Developer Account@@ -34,7 +33,6 @@ class CryptoHelper {CryptoUtil.base642bin(collection.keyDecryptionNonce!),);} else {- // If owned by a different user, decrypt with the public keycollectionKey = CryptoUtil.openSealSync(encryptedKey,CryptoUtil.base642bin(diff --git a/mobile/apps/locker/lib/utils/file_util.dart b/mobile/apps/locker/lib/utils/file_util.dartindex 86e196db8c..b1cf45dd93 100644--- a/mobile/apps/locker/lib/utils/file_util.dart+++ b/mobile/apps/locker/lib/utils/file_util.dart@@ -272,8 +272,6 @@ class FileUtil {}try {- // Use system file picker on both Android and iOS to let user- // choose where to save the file.final fileBytes = await decryptedFile.readAsBytes();final baseName = _baseNameWithoutExtension(targetFileName);final savedPath = await _saveFile(diff --git a/mobile/apps/photos/android/app/src/debug/AndroidManifest.xml b/mobile/apps/photos/android/app/src/debug/AndroidManifest.xmlindex cbf1924b23..ff3464529e 100644--- a/mobile/apps/photos/android/app/src/debug/AndroidManifest.xml+++ b/mobile/apps/photos/android/app/src/debug/AndroidManifest.xml@@ -1,8 +1,5 @@<manifest xmlns:android="http://schemas.android.com/apk/res/android"package="io.ente.photos">- <!-- Flutter needs it to communicate with the running application- to allow setting breakpoints, to provide hot reload, etc.- --><uses-permission android:name="android.permission.INTERNET"/><uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /><uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />diff --git a/mobile/apps/photos/android/app/src/dev/AndroidManifest.xml b/mobile/apps/photos/android/app/src/dev/AndroidManifest.xmlindex 40d572da89..aff74f99f8 100644--- a/mobile/apps/photos/android/app/src/dev/AndroidManifest.xml+++ b/mobile/apps/photos/android/app/src/dev/AndroidManifest.xml@@ -12,9 +12,6 @@</activity></application>- <!-- Flutter needs it to communicate with the running application- to allow setting breakpoints, to provide hot reload, etc.- --><uses-permission android:name="android.permission.INTERNET"/><uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /><uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />diff --git a/mobile/apps/photos/android/app/src/main/AndroidManifest.xml b/mobile/apps/photos/android/app/src/main/AndroidManifest.xmlindex 1e08637eb2..03558ba5f3 100644--- a/mobile/apps/photos/android/app/src/main/AndroidManifest.xml+++ b/mobile/apps/photos/android/app/src/main/AndroidManifest.xml@@ -45,7 +45,6 @@<data android:mimeType="video/*" /></intent-filter>- <!-- App Link --><intent-filter android:autoVerify="true"><action android:name="android.intent.action.VIEW" /><category android:name="android.intent.category.DEFAULT" />@@ -63,10 +62,6 @@android:host="albums.ente.com"/></intent-filter>- <!-- file provider to share files having a file:// URI -->-- <!--Filter- to support sharing images into our app--><intent-filter android:label="@string/backup"><action android:name="android.intent.action.SEND" /><category android:name="android.intent.category.DEFAULT" />@@ -248,8 +243,8 @@<meta-data android:name="android.appwidget.provider"android:resource="@xml/people_widget" /></receiver>- <receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" /> <!-- Needed for scheduling notifications -->- <receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver"> <!-- Needed for scheduling notifications -->+ <receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />+ <receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver"><intent-filter><action android:name="android.intent.action.BOOT_COMPLETED"/><action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>@@ -262,10 +257,8 @@<uses-permission android:name="android.permission.INTERNET" /><uses-permission android:name="android.permission.MANAGE_MEDIA" /><uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION" />- <uses-permission- android:name="android.permission.READ_MEDIA_IMAGES" /> <!-- If you want to read images-->- <uses-permission- android:name="android.permission.READ_MEDIA_VIDEO" /> <!-- If you want to read videos-->+ <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />+ <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" /><uses-permissionandroid:name="android.permission.READ_EXTERNAL_STORAGE"android:maxSdkVersion="32" />@@ -277,6 +270,6 @@<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /><uses-permission android:name="com.android.vending.BILLING" /><uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>- <uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/> <!-- Needed for scheduling notifications -->- <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> <!-- Needed for scheduling notifications -->+ <uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/>+ <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/></manifest>diff --git a/mobile/apps/photos/android/app/src/main/kotlin/io/ente/photos/EnteAlbumsWidgetProvider.kt b/mobile/apps/photos/android/app/src/main/kotlin/io/ente/photos/EnteAlbumsWidgetProvider.ktindex b2a8691eef..e4976b6d2c 100644--- a/mobile/apps/photos/android/app/src/main/kotlin/io/ente/photos/EnteAlbumsWidgetProvider.kt+++ b/mobile/apps/photos/android/app/src/main/kotlin/io/ente/photos/EnteAlbumsWidgetProvider.kt@@ -146,7 +146,6 @@ class EnteAlbumsWidgetProvider : HomeWidgetProvider() {subText)} else {- // Open App on Widget Clickval deepLinkUri =Uri.parse("albumwidget://configure?homeWidget"diff --git a/mobile/apps/photos/android/app/src/main/kotlin/io/ente/photos/EnteMemoryWidgetProvider.kt b/mobile/apps/photos/android/app/src/main/kotlin/io/ente/photos/EnteMemoryWidgetProvider.ktindex 5703404839..835cfa29e1 100644--- a/mobile/apps/photos/android/app/src/main/kotlin/io/ente/photos/EnteMemoryWidgetProvider.kt+++ b/mobile/apps/photos/android/app/src/main/kotlin/io/ente/photos/EnteMemoryWidgetProvider.kt@@ -139,7 +139,6 @@ class EnteMemoryWidgetProvider : HomeWidgetProvider() {subText)} else {- // Open App on Widget Clickval deepLinkUri =Uri.parse("memorywidget://configure?homeWidget"diff --git a/mobile/apps/photos/android/app/src/main/kotlin/io/ente/photos/EntePeopleWidgetProvider.kt b/mobile/apps/photos/android/app/src/main/kotlin/io/ente/photos/EntePeopleWidgetProvider.ktindex 488df04b07..78edf4ae58 100644--- a/mobile/apps/photos/android/app/src/main/kotlin/io/ente/photos/EntePeopleWidgetProvider.kt+++ b/mobile/apps/photos/android/app/src/main/kotlin/io/ente/photos/EntePeopleWidgetProvider.kt@@ -145,7 +145,6 @@ class EntePeopleWidgetProvider : HomeWidgetProvider() {subText)} else {- // Open App on Widget Clickval deepLinkUri =Uri.parse("peoplewidget://configure?homeWidget"diff --git a/mobile/apps/photos/android/app/src/main/res/layout/albums_widget_layout.xml b/mobile/apps/photos/android/app/src/main/res/layout/albums_widget_layout.xmlindex 62ca6410cf..30d329e570 100644--- a/mobile/apps/photos/android/app/src/main/res/layout/albums_widget_layout.xml+++ b/mobile/apps/photos/android/app/src/main/res/layout/albums_widget_layout.xml@@ -4,15 +4,13 @@android:layout_height="match_parent"android:id="@+id/widget_container">- <!-- Main Image (if available) --><ImageViewandroid:id="@+id/widget_img"android:layout_width="match_parent"android:layout_height="match_parent"android:scaleType="centerCrop"- android:visibility="gone" /> <!-- Initially hidden -->+ android:visibility="gone" />- <!-- Gradient Overlay for Text Readability --><LinearLayoutandroid:id="@+id/widget_overlay"android:layout_width="match_parent"@@ -24,9 +22,8 @@android:paddingBottom="16dp"android:paddingTop="4dp"android:background="@layout/gradient_overlay"- android:visibility="gone"> <!-- Initially hidden, shown when image is available -->+ android:visibility="gone">- <!-- Title --><TextViewandroid:id="@+id/widget_title"android:layout_width="wrap_content"@@ -39,7 +36,6 @@android:ellipsize="end"android:visibility="gone"/>- <!-- Subtitle --><TextViewandroid:id="@+id/widget_subtitle"android:layout_width="wrap_content"@@ -52,7 +48,6 @@android:visibility="gone"/></LinearLayout>- <!-- Placeholder View (when no image available) --><LinearLayoutandroid:id="@+id/widget_placeholder_container"android:layout_width="match_parent"diff --git a/mobile/apps/photos/android/app/src/main/res/layout/memory_widget_layout.xml b/mobile/apps/photos/android/app/src/main/res/layout/memory_widget_layout.xmlindex 47ef2d9fb2..ee043c7de1 100644--- a/mobile/apps/photos/android/app/src/main/res/layout/memory_widget_layout.xml+++ b/mobile/apps/photos/android/app/src/main/res/layout/memory_widget_layout.xml@@ -4,15 +4,13 @@android:layout_height="match_parent"android:id="@+id/widget_container">- <!-- Main Image (if available) --><ImageViewandroid:id="@+id/widget_img"android:layout_width="match_parent"android:layout_height="match_parent"android:scaleType="centerCrop"- android:visibility="gone" /> <!-- Initially hidden -->+ android:visibility="gone" />- <!-- Gradient Overlay for Text Readability --><LinearLayoutandroid:id="@+id/widget_overlay"android:layout_width="match_parent"@@ -24,9 +22,8 @@android:paddingBottom="16dp"android:paddingTop="4dp"android:background="@layout/gradient_overlay"- android:visibility="gone"> <!-- Initially hidden, shown when image is available -->+ android:visibility="gone">- <!-- Title --><TextViewandroid:id="@+id/widget_title"android:layout_width="wrap_content"@@ -39,7 +36,6 @@android:ellipsize="end"android:visibility="gone"/>- <!-- Subtitle --><TextViewandroid:id="@+id/widget_subtitle"android:layout_width="wrap_content"@@ -52,7 +48,6 @@android:visibility="gone"/></LinearLayout>- <!-- Placeholder View (when no image available) --><LinearLayoutandroid:id="@+id/widget_placeholder_container"android:layout_width="match_parent"diff --git a/mobile/apps/photos/android/app/src/main/res/layout/people_widget_layout.xml b/mobile/apps/photos/android/app/src/main/res/layout/people_widget_layout.xmlindex 812f147f35..4f54c25619 100644--- a/mobile/apps/photos/android/app/src/main/res/layout/people_widget_layout.xml+++ b/mobile/apps/photos/android/app/src/main/res/layout/people_widget_layout.xml@@ -4,15 +4,13 @@android:layout_height="match_parent"android:id="@+id/widget_container">- <!-- Main Image (if available) --><ImageViewandroid:id="@+id/widget_img"android:layout_width="match_parent"android:layout_height="match_parent"android:scaleType="centerCrop"- android:visibility="gone" /> <!-- Initially hidden -->+ android:visibility="gone" />- <!-- Gradient Overlay for Text Readability --><LinearLayoutandroid:id="@+id/widget_overlay"android:layout_width="match_parent"@@ -24,9 +22,8 @@android:paddingBottom="16dp"android:paddingTop="4dp"android:background="@layout/gradient_overlay"- android:visibility="gone"> <!-- Initially hidden, shown when image is available -->+ android:visibility="gone">- <!-- Title --><TextViewandroid:id="@+id/widget_title"android:layout_width="wrap_content"@@ -39,7 +36,6 @@android:ellipsize="end"android:visibility="gone"/>- <!-- Subtitle --><TextViewandroid:id="@+id/widget_subtitle"android:layout_width="wrap_content"@@ -52,7 +48,6 @@android:visibility="gone"/></LinearLayout>- <!-- Placeholder View (when no image available) --><LinearLayoutandroid:id="@+id/widget_placeholder_container"android:layout_width="match_parent"diff --git a/mobile/apps/photos/android/app/src/main/res/values-night-v31/styles.xml b/mobile/apps/photos/android/app/src/main/res/values-night-v31/styles.xmlindex c4a573dfe2..fcf07ec0ed 100644--- a/mobile/apps/photos/android/app/src/main/res/values-night-v31/styles.xml+++ b/mobile/apps/photos/android/app/src/main/res/values-night-v31/styles.xml@@ -1,6 +1,5 @@<?xml version="1.0" encoding="utf-8"?><resources>- <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off --><style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar"><item name="android:forceDarkAllowed">false</item><item name="android:windowFullscreen">false</item>@@ -9,12 +8,6 @@<item name="android:windowSplashScreenBackground">#000000</item><item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item></style>- <!-- Theme applied to the Android Window as soon as the process has started.- This theme determines the color of the Android Window while your- Flutter UI initializes, as well as behind your Flutter UI while its- running.-- This Theme is only used starting with V2 of Flutter's Android embedding. --><style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar"><item name="android:windowBackground">?android:colorBackground</item></style>diff --git a/mobile/apps/photos/android/app/src/main/res/values-night/colors.xml b/mobile/apps/photos/android/app/src/main/res/values-night/colors.xmlindex bbc601c13f..2c80f7512b 100644--- a/mobile/apps/photos/android/app/src/main/res/values-night/colors.xml+++ b/mobile/apps/photos/android/app/src/main/res/values-night/colors.xml@@ -1,4 +1,4 @@<resources>- <color name="widget_placeholder_bg">#222222</color> <!-- Dark Mode -->+ <color name="widget_placeholder_bg">#222222</color><color name="widget_text_color">#EEEEEE</color></resources>diff --git a/mobile/apps/photos/android/app/src/main/res/values-night/styles.xml b/mobile/apps/photos/android/app/src/main/res/values-night/styles.xmlindex 7b20e158ca..86a149aa59 100644--- a/mobile/apps/photos/android/app/src/main/res/values-night/styles.xml+++ b/mobile/apps/photos/android/app/src/main/res/values-night/styles.xml@@ -1,21 +1,12 @@<?xml version="1.0" encoding="utf-8"?><resources>- <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on --><style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">- <!-- Show a splash screen on the activity. Automatically removed when- Flutter draws its first frame --><item name="android:windowBackground">@drawable/launch_background</item><item name="android:forceDarkAllowed">false</item><item name="android:windowFullscreen">false</item><item name="android:windowDrawsSystemBarBackgrounds">false</item><item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item></style>- <!-- Theme applied to the Android Window as soon as the process has started.- This theme determines the color of the Android Window while your- Flutter UI initializes, as well as behind your Flutter UI while its- running.-- This Theme is only used starting with V2 of Flutter's Android embedding. --><style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar"><item name="android:windowBackground">?android:colorBackground</item></style>diff --git a/mobile/apps/photos/android/app/src/main/res/values-v31/styles.xml b/mobile/apps/photos/android/app/src/main/res/values-v31/styles.xmlindex e437c387e1..53bf3f559d 100644--- a/mobile/apps/photos/android/app/src/main/res/values-v31/styles.xml+++ b/mobile/apps/photos/android/app/src/main/res/values-v31/styles.xml@@ -1,6 +1,5 @@<?xml version="1.0" encoding="utf-8"?><resources>- <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off --><style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar"><item name="android:forceDarkAllowed">false</item><item name="android:windowFullscreen">false</item>@@ -9,12 +8,6 @@<item name="android:windowSplashScreenBackground">#ffffff</item><item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item></style>- <!-- Theme applied to the Android Window as soon as the process has started.- This theme determines the color of the Android Window while your- Flutter UI initializes, as well as behind your Flutter UI while its- running.-- This Theme is only used starting with V2 of Flutter's Android embedding. --><style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar"><item name="android:windowBackground">?android:colorBackground</item></style>diff --git a/mobile/apps/photos/android/app/src/main/res/values/colors.xml b/mobile/apps/photos/android/app/src/main/res/values/colors.xmlindex 4427af4396..53729c0503 100644--- a/mobile/apps/photos/android/app/src/main/res/values/colors.xml+++ b/mobile/apps/photos/android/app/src/main/res/values/colors.xml@@ -4,6 +4,6 @@<color name="ic_launcher_background">#08C225</color><color name="ic_launcher_background_light">#ffffff</color><color name="ic_launcher_background_dark">#000000</color>- <color name="widget_placeholder_bg">#FFFFFF</color> <!-- Default (Light Mode) -->+ <color name="widget_placeholder_bg">#FFFFFF</color><color name="widget_text_color">#222222</color></resources>\ No newline at end of filediff --git a/mobile/apps/photos/android/app/src/main/res/values/styles.xml b/mobile/apps/photos/android/app/src/main/res/values/styles.xmlindex 4d705c74a9..6714d603ef 100644--- a/mobile/apps/photos/android/app/src/main/res/values/styles.xml+++ b/mobile/apps/photos/android/app/src/main/res/values/styles.xml@@ -1,8 +1,6 @@<?xml version="1.0" encoding="utf-8"?><resources><style name="LaunchTheme" parent="Theme.AppCompat.NoActionBar">- <!-- Show a splash screen on the activity. Automatically removed when- Flutter draws its first frame --><item name="android:windowBackground">@drawable/launch_background</item></style></resources>diff --git a/mobile/apps/photos/android/app/src/profile/AndroidManifest.xml b/mobile/apps/photos/android/app/src/profile/AndroidManifest.xmlindex 718370751e..cb754b1fe6 100644--- a/mobile/apps/photos/android/app/src/profile/AndroidManifest.xml+++ b/mobile/apps/photos/android/app/src/profile/AndroidManifest.xml@@ -1,7 +1,4 @@<manifest xmlns:android="http://schemas.android.com/apk/res/android"package="io.ente.photos">- <!-- Flutter needs it to communicate with the running application- to allow setting breakpoints, to provide hot reload, etc.- --><uses-permission android:name="android.permission.INTERNET"/></manifest>diff --git a/mobile/apps/photos/ios/EnteAlbumWidget/EnteAlbumWidget.swift b/mobile/apps/photos/ios/EnteAlbumWidget/EnteAlbumWidget.swiftindex ecd6575c9c..e376237006 100644--- a/mobile/apps/photos/ios/EnteAlbumWidget/EnteAlbumWidget.swift+++ b/mobile/apps/photos/ios/EnteAlbumWidget/EnteAlbumWidget.swift@@ -32,7 +32,6 @@ struct Provider: TimelineProvider {func getTimeline(in _: Context, completion: @escaping (Timeline<Entry>) -> Void) {var entries: [FileEntry] = []- // Generate a timeline consisting of five entries an hour apart, starting from the current date.let currentDate = Calendar.current.nextDate(after: Date(), matching: DateComponents(second: 0), matchingPolicy: .nextTime,direction: .backward@@ -77,9 +76,6 @@ struct Provider: TimelineProvider {completion(timeline)}- // func relevances() async -> WidgetRelevances<Void> {- // // Generate a list containing the contexts this widget is relevant in.- // }}struct FileEntry: TimelineEntry {diff --git a/mobile/apps/photos/ios/EnteMemoryWidget/EnteMemoryWidget.swift b/mobile/apps/photos/ios/EnteMemoryWidget/EnteMemoryWidget.swiftindex 49bbb2a108..fbfb7fada5 100644--- a/mobile/apps/photos/ios/EnteMemoryWidget/EnteMemoryWidget.swift+++ b/mobile/apps/photos/ios/EnteMemoryWidget/EnteMemoryWidget.swift@@ -32,7 +32,6 @@ struct Provider: TimelineProvider {func getTimeline(in _: Context, completion: @escaping (Timeline<Entry>) -> Void) {var entries: [FileEntry] = []- // Generate a timeline consisting of five entries an hour apart, starting from the current date.let currentDate = Calendar.current.nextDate(after: Date(), matching: DateComponents(second: 0), matchingPolicy: .nextTime,direction: .backward@@ -75,9 +74,6 @@ struct Provider: TimelineProvider {completion(timeline)}- // func relevances() async -> WidgetRelevances<Void> {- // // Generate a list containing the contexts this widget is relevant in.- // }}struct FileEntry: TimelineEntry {diff --git a/mobile/apps/photos/ios/EntePeopleWidget/EntePeopleWidget.swift b/mobile/apps/photos/ios/EntePeopleWidget/EntePeopleWidget.swiftindex 2b86a99e7c..a9281277af 100644--- a/mobile/apps/photos/ios/EntePeopleWidget/EntePeopleWidget.swift+++ b/mobile/apps/photos/ios/EntePeopleWidget/EntePeopleWidget.swift@@ -32,7 +32,6 @@ struct Provider: TimelineProvider {func getTimeline(in _: Context, completion: @escaping (Timeline<Entry>) -> Void) {var entries: [FileEntry] = []- // Generate a timeline consisting of five entries an hour apart, starting from the current date.let currentDate = Calendar.current.nextDate(after: Date(), matching: DateComponents(second: 0), matchingPolicy: .nextTime,direction: .backward@@ -77,9 +76,6 @@ struct Provider: TimelineProvider {completion(timeline)}- // func relevances() async -> WidgetRelevances<Void> {- // // Generate a list containing the contexts this widget is relevant in.- // }}struct FileEntry: TimelineEntry {diff --git a/mobile/apps/photos/ios/Runner/AppDelegate.swift b/mobile/apps/photos/ios/Runner/AppDelegate.swiftindex 127377541f..3a26fe44e7 100644--- a/mobile/apps/photos/ios/Runner/AppDelegate.swift+++ b/mobile/apps/photos/ios/Runner/AppDelegate.swift@@ -36,17 +36,14 @@ import workmanager_appleGeneratedPluginRegistrant.register(with: registry)}var freqInMinutes = 30 * 60- // Register a periodic task in iOS 13+WorkmanagerPlugin.registerPeriodicTask(withIdentifier: "io.ente.frame.iOSBackgroundAppRefresh",frequency: NSNumber(value: freqInMinutes))- // Retrieve the link from parametersif let url = AppLinks.shared.getLink(launchOptions: launchOptions) {// only accept non-homewidget urls for AppLinksif !url.absoluteString.contains("homeWidget") {AppLinks.shared.handleLink(url: url)- // link is handled, stop propagationreturn true}}diff --git a/mobile/apps/photos/ios/ShareExtension/ShareViewController.swift b/mobile/apps/photos/ios/ShareExtension/ShareViewController.swiftindex 93907beae6..3729feb203 100644--- a/mobile/apps/photos/ios/ShareExtension/ShareViewController.swift+++ b/mobile/apps/photos/ios/ShareExtension/ShareViewController.swift@@ -2,8 +2,6 @@ import receive_sharing_intentclass ShareViewController: RSIShareViewController {- // Use this method to return false if you don't want to redirect to host app automatically.- // Default is trueoverride func shouldAutoRedirect() -> Bool {return true}diff --git a/mobile/apps/photos/lib/core/constants.dart b/mobile/apps/photos/lib/core/constants.dartindex 8d1f0ae2d0..561b2821e5 100644--- a/mobile/apps/photos/lib/core/constants.dart+++ b/mobile/apps/photos/lib/core/constants.dart@@ -50,7 +50,7 @@ const kFamilyUrl = 'https://family.ente.io';const int intMaxValue = 9223372036854775807;-//Screen width of iPhone 14 pro max in points is taken as maximum+// Cap layouts at the 430-point width of an iPhone 14 Pro Max.const double restrictedMaxWidth = 430;const double mobileSmallThreshold = 336;diff --git a/mobile/apps/photos/lib/core/errors.dart b/mobile/apps/photos/lib/core/errors.dartindex 307d49b380..d6645bd813 100644--- a/mobile/apps/photos/lib/core/errors.dart+++ b/mobile/apps/photos/lib/core/errors.dart@@ -52,7 +52,6 @@ class StorageLimitExceededError extends Error implements LocallyHandledError {}class DeviceStorageFullError extends Error implements LocallyHandledError {}-// error when file size + current usage >= storage plan limit + bufferclass FileTooLargeForPlanError extends Error {}class SilentlyCancelUploadsError extends Error {}diff --git a/mobile/apps/photos/lib/models/file/trash_file.dart b/mobile/apps/photos/lib/models/file/trash_file.dartindex 0caaea98c6..dddd1de6c2 100644--- a/mobile/apps/photos/lib/models/file/trash_file.dart+++ b/mobile/apps/photos/lib/models/file/trash_file.dart@@ -20,7 +20,6 @@ class EnteTrashFile extends TrashFile {required this.updateAt,}) : super.from();- // time when file was put in the trash for first timelate int createdAt;// for non-deleted trash items, updateAt is usually equal to the latest timediff --git a/mobile/apps/photos/lib/models/gallery_type.dart b/mobile/apps/photos/lib/models/gallery_type.dartindex a5a002b713..1f0d8f0017 100644--- a/mobile/apps/photos/lib/models/gallery_type.dart+++ b/mobile/apps/photos/lib/models/gallery_type.dart@@ -13,7 +13,6 @@ enum GalleryType {trash,deleteSuggestions,localFolder,- // indicator for gallery view of collections shared with the usersharedCollection,ownedCollection,searchResults,diff --git a/mobile/apps/photos/lib/models/ml/discover/prompt.dart b/mobile/apps/photos/lib/models/ml/discover/prompt.dartindex ee568fd60a..71f9b5ae51 100644--- a/mobile/apps/photos/lib/models/ml/discover/prompt.dart+++ b/mobile/apps/photos/lib/models/ml/discover/prompt.dart@@ -1,4 +1,3 @@-// Loaded from assets/discover.jsonclass Prompt {final String id;final int position;diff --git a/mobile/apps/photos/lib/models/search/hierarchical/hierarchical_search_filter.dart b/mobile/apps/photos/lib/models/search/hierarchical/hierarchical_search_filter.dartindex 321d86144a..b5009dcfff 100644--- a/mobile/apps/photos/lib/models/search/hierarchical/hierarchical_search_filter.dart+++ b/mobile/apps/photos/lib/models/search/hierarchical/hierarchical_search_filter.dart@@ -19,10 +19,8 @@ enum FilterTypeNames {}abstract class HierarchicalSearchFilter {- //These matches should be from list of all files in db and not just all files- //in gallery since this is used as cache for faster filtering when- //adding/removing applied filters.final String filterTypeName;+ // Match every database file so removing another filter can restore results.final Set<int> matchedUploadedIDs;bool isApplied = false;diff --git a/mobile/apps/photos/lib/models/search/recent_searches.dart b/mobile/apps/photos/lib/models/search/recent_searches.dartindex 2c31f86b03..25b53c6cfa 100644--- a/mobile/apps/photos/lib/models/search/recent_searches.dart+++ b/mobile/apps/photos/lib/models/search/recent_searches.dart@@ -15,8 +15,7 @@ class RecentSearches with ChangeNotifier {while (searches.length > kSearchSectionLimit) {searches.remove(searches.first);}- //buffer for not surfacing a new recent search before going to the next- //screen+ // Avoid surfacing the new search before the next screen opens.Future.delayed(const Duration(seconds: 1), () {notifyListeners();});diff --git a/mobile/apps/photos/lib/models/search/search_types.dart b/mobile/apps/photos/lib/models/search/search_types.dartindex fb4ab9f499..7d872b51f7 100644--- a/mobile/apps/photos/lib/models/search/search_types.dart+++ b/mobile/apps/photos/lib/models/search/search_types.dart@@ -217,7 +217,7 @@ extension SectionTypeExtensions on SectionType {final Collection c = await CollectionsService.instance.createAlbum(text);- // Close the dialog now so that it does not flash when leaving the album again.+ // Close now so it does not flash when returning from the album.if (!context.mounted) return;Navigator.of(context).pop();diff --git a/mobile/apps/photos/lib/models/upload_strategy.dart b/mobile/apps/photos/lib/models/upload_strategy.dartindex 6fcf43baf5..958ff27238 100644--- a/mobile/apps/photos/lib/models/upload_strategy.dart+++ b/mobile/apps/photos/lib/models/upload_strategy.dart@@ -1,8 +1,5 @@enum UploadStrategy {- // uploader will only try to upload the file in a collection if the file is- // not already uploadedifMissing,- // alwaysUpload will always try to upload or add the file to given collectionalways,other,}diff --git a/mobile/apps/photos/lib/models/user_details.dart b/mobile/apps/photos/lib/models/user_details.dartindex 8ec03b7270..5e3039047b 100644--- a/mobile/apps/photos/lib/models/user_details.dart+++ b/mobile/apps/photos/lib/models/user_details.dart@@ -111,7 +111,6 @@ class UserDetails {return null;}- // This is the total storage for which user has paid for.int getPlanPlusAddonStorage() {return (isPartOfFamily() ? familyData!.storage : subscription.storage) +bonusData!.totalAddOnBonus();@@ -239,7 +238,6 @@ class ProfileData {class FamilyData {final List<FamilyMember>? members;- // Storage available based on the family planfinal int storage;final int expiryTime;final int adminBonus;diff --git a/mobile/apps/photos/lib/module/download/gallery.dart b/mobile/apps/photos/lib/module/download/gallery.dartindex d9a2533c11..1c0d8186c3 100644--- a/mobile/apps/photos/lib/module/download/gallery.dart+++ b/mobile/apps/photos/lib/module/download/gallery.dart@@ -91,12 +91,9 @@ Future<void> downloadToGallery(}final galleryTitle = _getGallerySaveTitle(file, fileToSave.path);final mediaStoreTitle = await getMediaStoreCompatibleTitle(galleryTitle);- // We use a lock to prevent synchronisation to occur while it is downloading- // as this introduces wrong entry in FilesDB due to race condition- // This is a fix for https://github.com/ente/ente/issues/4296+ // Keep sync from seeing the saved asset before it is inserted into FilesDB.+ // https://github.com/ente/ente/issues/4296await LocalSyncService.instance.getLock().synchronized(() async {- //Disabling notifications for assets changing to insert the file into- //files db before triggering a sync.await PhotoManager.stopChangeNotify();if (type == FileType.image) {savedAsset = await PhotoManager.editor.saveImageWithPath(diff --git a/mobile/apps/photos/lib/module/download/thumbnail.dart b/mobile/apps/photos/lib/module/download/thumbnail.dartindex a0cdd98100..2f323643a5 100644--- a/mobile/apps/photos/lib/module/download/thumbnail.dart+++ b/mobile/apps/photos/lib/module/download/thumbnail.dart@@ -147,8 +147,6 @@ _getThumbnailFromServerRequest(EnteFile file) async {acquiredPendingRequestRef: false,);}- // Check if there's already in flight request for fetching thumbnail from the- // serverfinal existing = _uploadIDToDownloadItem[file.uploadedFileID];if (existing == null) {final item = _ThumbnailDownload(diff --git a/mobile/apps/photos/lib/services/notification_service.dart b/mobile/apps/photos/lib/services/notification_service.dartindex e27a673a87..031cbd8b8c 100644--- a/mobile/apps/photos/lib/services/notification_service.dart+++ b/mobile/apps/photos/lib/services/notification_service.dart@@ -324,7 +324,6 @@ class NotificationService {dateTime.minute,dateTime.second,);- // final tz.TZDateTime scheduledDate = tz.TZDateTime.now(tz.local).add(delay);await _notificationsPlugin.zonedSchedule(id,title,diff --git a/mobile/apps/photos/lib/services/social_sync_service.dart b/mobile/apps/photos/lib/services/social_sync_service.dartindex 1aca10be47..816c717ab1 100644--- a/mobile/apps/photos/lib/services/social_sync_service.dart+++ b/mobile/apps/photos/lib/services/social_sync_service.dart@@ -117,7 +117,7 @@ class SocialSyncService {final response = await _api.fetchSocialDiff(collectionID: collectionID,fileID: fileID,- // Always get all data for the file (no sinceTime = fetch all)+ // Omitting sinceTime fetches the file's complete social history.);if (response.comments.isNotEmpty) {diff --git a/mobile/apps/photos/lib/services/sync/remote_sync_service.dart b/mobile/apps/photos/lib/services/sync/remote_sync_service.dartindex 0e755a6b9d..e3f57191fd 100644--- a/mobile/apps/photos/lib/services/sync/remote_sync_service.dart+++ b/mobile/apps/photos/lib/services/sync/remote_sync_service.dart@@ -132,7 +132,6 @@ class RemoteSyncService {await trashSyncService.syncTrash();await _collectionsService.movePendingRemovalActionsToUncategorized();- // Sync social data immediately after the diff, before uploads.if (AppLifecycleService.instance.isForeground) {_socialSync().ignore();} else {@@ -387,7 +386,6 @@ class RemoteSyncService {late final Set<String> newerLocalIDs;if (backNewPhotosOnly) {final int onlyNewSince = backupPreferenceService.onlyNewSinceEpoch!;- // Fetch newer IDs once for all backup folders.newerLocalIDs = await _db.getAllLocalIDsNewerThan(onlyNewSince);_logger.info("Found ${newerLocalIDs.length} newer files");}@@ -796,10 +794,7 @@ class RemoteSyncService {remoteNewFile = 0;final int userID = _config.getUserID()!;bool needsGalleryReload = false;- // this is required when same file is uploaded twice in the same- // collection. Without this check, if both remote files are part of same- // diff response, then we end up inserting one entry instead of two- // as we update the generatedID for remoteFile to local file's genID+ // A diff can contain two uploads of one local file. Claim its row only once.final Set<int> alreadyClaimedLocalFilesGenID = {};final List<EnteFile> toBeInserted = [];@@ -975,7 +970,6 @@ class RemoteSyncService {!AppLifecycleService.instance.isForeground;}- // Upload newest files first, but defer videos in the background.void _sortByTime(List<EnteFile> file) {file.sort((first, second) {if (!AppLifecycleService.instance.isForeground &&@@ -988,8 +982,6 @@ class RemoteSyncService {});}- // Prefer a local file in each iOS background slot; otherwise use the next- // file in line.Future<List<EnteFile>> _buildBgUploadQueue(List<EnteFile> files) async {const maxChecksPerSlot = kMaximumPermissibleUploadsInThrottledMode;const slots = kMaximumPermissibleUploadsInThrottledMode;diff --git a/mobile/apps/photos/lib/states/all_sections_examples_state.dart b/mobile/apps/photos/lib/states/all_sections_examples_state.dartindex 5876c64310..070e54d18b 100644--- a/mobile/apps/photos/lib/states/all_sections_examples_state.dart+++ b/mobile/apps/photos/lib/states/all_sections_examples_state.dart@@ -41,12 +41,8 @@ class AllSectionsExamplesProvider extends StatefulWidget {class _AllSectionsExamplesProviderStateextends State<AllSectionsExamplesProvider> {- //Some section results in [allSectionsExamplesFuture] can be out of sync- //with what is displayed on UI. This happens when some section is- //independently listening to some set of events and is rebuilt. Sections- //can listen to a list of events and rebuild (see sectionUpdateEvents()- //in search_types.dart) and new results will not reflect in- //[allSectionsExamplesFuture] unless reloadAllSections() is called.+ // Sections refresh independently, so their displayed results can be newer+ // than this aggregate until reloadAllSections runs.Future<AllSectionsExamplesData> allSectionsExamplesFuture = Future.value(const AllSectionsExamplesData(sectionResults: [],@@ -74,7 +70,7 @@ class _AllSectionsExamplesProviderState@overridevoid initState() {super.initState();- //add all common events for all search sections to reload to here.+ // Reload the aggregate for events shared by every search section._filesUpdatedEvent = Bus.instance.on<FilesUpdatedEvent>().listen((event) {onDataUpdate();});diff --git a/mobile/apps/photos/lib/states/location_screen_state.dart b/mobile/apps/photos/lib/states/location_screen_state.dartindex bc4edb053d..7d5c711ce1 100644--- a/mobile/apps/photos/lib/states/location_screen_state.dart+++ b/mobile/apps/photos/lib/states/location_screen_state.dart@@ -62,8 +62,6 @@ class InheritedLocationScreenState extends InheritedWidget {required super.child,});- //This is used to show loading state when memory count is beign computed and to- //show count after computation.static final memoryCountNotifier = ValueNotifier<int?>(null);static InheritedLocationScreenState of(BuildContext context) {diff --git a/mobile/apps/photos/lib/ui/actions/collection/collection_sharing_actions.dart b/mobile/apps/photos/lib/ui/actions/collection/collection_sharing_actions.dartindex 15e0b51aea..d4f184eed0 100644--- a/mobile/apps/photos/lib/ui/actions/collection/collection_sharing_actions.dart+++ b/mobile/apps/photos/lib/ui/actions/collection/collection_sharing_actions.dart@@ -707,8 +707,6 @@ class CollectionActions {in destCollectionToFilesMap.entries) {if (collection.type == CollectionType.uncategorized &&entry.key == collection.id) {- // skip moving files to uncategorized collection from uncategorized- // this flow is triggered while cleaning up uncategerized collectionlogger.info('skipping moving ${entry.value.length} files to uncategorized collection',);diff --git a/mobile/apps/photos/lib/ui/collections/album/row_item.dart b/mobile/apps/photos/lib/ui/collections/album/row_item.dartindex 92303c5b04..46b8b13d02 100644--- a/mobile/apps/photos/lib/ui/collections/album/row_item.dart+++ b/mobile/apps/photos/lib/ui/collections/album/row_item.dart@@ -107,8 +107,7 @@ class AlbumRowItemWidget extends StatelessWidget {if (snapshot.hasData) {thumbnail = snapshot.data!;} else {- //Need to use cached thumbnail so that the hero- //animation works as expected.+ // Reuse the cached thumbnail for a stable Hero.thumbnail = CollectionsService.instance.getCoverCache(c);}@@ -279,8 +278,7 @@ class AlbumRowItemWidget extends StatelessWidget {if (snapshot.hasData) {cachedCount = snapshot.data;} else {- //Need to use cached count so that the hero- //animation works as expected without flickering.+ // Reuse the cached count to prevent Hero flicker.cachedCount = CollectionsService.instance.getCachedFileCount(c);}diff --git a/mobile/apps/photos/lib/ui/common/backup_flow_helper.dart b/mobile/apps/photos/lib/ui/common/backup_flow_helper.dartindex c3c3f3c95a..0da818193a 100644--- a/mobile/apps/photos/lib/ui/common/backup_flow_helper.dart+++ b/mobile/apps/photos/lib/ui/common/backup_flow_helper.dart@@ -85,12 +85,7 @@ Future<bool?> _handleFirstImportFlow(BuildContext context) async {return null;}- // Trigger local sync before showing the loading widget.- // The skip flag was cleared above, so sync will now proceed with first import.- // We use LocalSyncService.sync() directly because:- // 1. It has its own _existingSync guard - returns existing future if already running- // 2. It's all we need for first import (fires completedFirstGalleryImport event)- // 3. Avoids race conditions with SyncService._doSync() calling syncAll()+ // Start local import directly; SyncService can race it by also calling syncAll._logger.info("Triggering local sync for first import from backup flow");unawaited(LocalSyncService.instance.sync());diff --git a/mobile/apps/photos/lib/ui/components/bottom_action_bar/expanded_menu_widget.dart b/mobile/apps/photos/lib/ui/components/bottom_action_bar/expanded_menu_widget.dartindex 26d5f86c33..8ab82517b1 100644--- a/mobile/apps/photos/lib/ui/components/bottom_action_bar/expanded_menu_widget.dart+++ b/mobile/apps/photos/lib/ui/components/bottom_action_bar/expanded_menu_widget.dart@@ -9,7 +9,7 @@ class ExpandedMenuWidget extends StatelessWidget {@overrideWidget build(BuildContext context) {final textScaler = MediaQuery.of(context).textScaler;- //20 is height of font and 28 is total whitespace (top+bottom)+ // Each row uses 20 points for text and 28 for vertical spacing.var scaledHeight = textScaler.scale(20);if (scaledHeight < 20) {scaledHeight = 20;diff --git a/mobile/apps/photos/lib/ui/components/bottom_of_title_bar_widget.dart b/mobile/apps/photos/lib/ui/components/bottom_of_title_bar_widget.dartindex f628f28924..c596f703da 100644--- a/mobile/apps/photos/lib/ui/components/bottom_of_title_bar_widget.dart+++ b/mobile/apps/photos/lib/ui/components/bottom_of_title_bar_widget.dart@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';import 'package:photos/theme/ente_theme.dart';import 'package:photos/ui/components/title_bar_title_widget.dart';-///https://www.figma.com/file/SYtMyLBs5SAOkTbfMMzhqt/ente-Visual-Design?node-id=7309%3A29088&t=ReeZ2Big8xSsemZb-4+// https://www.figma.com/file/SYtMyLBs5SAOkTbfMMzhqt/ente-Visual-Design?node-id=7309%3A29088&t=ReeZ2Big8xSsemZb-4class BottomOfTitleBarWidget extends StatelessWidget {final TitleBarTitleWidget? title;final String? caption;diff --git a/mobile/apps/photos/lib/ui/components/empty_state_item_widget.dart b/mobile/apps/photos/lib/ui/components/empty_state_item_widget.dartindex 8535040c36..4075521516 100644--- a/mobile/apps/photos/lib/ui/components/empty_state_item_widget.dart+++ b/mobile/apps/photos/lib/ui/components/empty_state_item_widget.dart@@ -1,7 +1,7 @@import "package:flutter/material.dart";import "package:photos/theme/ente_theme.dart";-///https://www.figma.com/file/SYtMyLBs5SAOkTbfMMzhqt/ente-Visual-Design?node-id=11379%3A67490&t=VI5KulbW3HMM5MVz-4+// https://www.figma.com/file/SYtMyLBs5SAOkTbfMMzhqt/ente-Visual-Design?node-id=11379%3A67490&t=VI5KulbW3HMM5MVz-4class EmptyStateItemWidget extends StatelessWidget {final String textContent;diff --git a/mobile/apps/photos/lib/ui/components/info_item_widget.dart b/mobile/apps/photos/lib/ui/components/info_item_widget.dartindex 2d0bf39d2e..21a9aa340a 100644--- a/mobile/apps/photos/lib/ui/components/info_item_widget.dart+++ b/mobile/apps/photos/lib/ui/components/info_item_widget.dart@@ -7,7 +7,7 @@ import "package:hugeicons/hugeicons.dart";import "package:photos/theme/ente_theme.dart";import 'package:photos/ui/components/buttons/icon_button_widget.dart';-///https://www.figma.com/file/SYtMyLBs5SAOkTbfMMzhqt/ente-Visual-Design?node-id=8113-59605&t=OMX5f5KdDJYWSQQN-4+// https://www.figma.com/file/SYtMyLBs5SAOkTbfMMzhqt/ente-Visual-Design?node-id=8113-59605&t=OMX5f5KdDJYWSQQN-4class InfoItemWidget extends StatelessWidget {final IconData? leadingIcon;final Widget? leadingIconWidget;diff --git a/mobile/apps/photos/lib/ui/components/toggle_switch_widget.dart b/mobile/apps/photos/lib/ui/components/toggle_switch_widget.dartindex 4e44db8888..abbfe999fd 100644--- a/mobile/apps/photos/lib/ui/components/toggle_switch_widget.dart+++ b/mobile/apps/photos/lib/ui/components/toggle_switch_widget.dart@@ -113,6 +113,7 @@ class _ToggleSwitchWidgetState extends State<ToggleSwitchWidget> {}Future<void> _feedbackOnUnsuccessfulToggle(Stopwatch stopwatch) async {+ // Keep the optimistic state visible for at least 200 milliseconds.final timeElapsed = stopwatch.elapsedMilliseconds;if (timeElapsed < 200) {await Future.delayed(Duration(milliseconds: 200 - timeElapsed));@@ -123,7 +124,7 @@ class _ToggleSwitchWidgetState extends State<ToggleSwitchWidget> {if (!mounted) return;setState(() {toggleValue = negationOfToggleValue;- //start showing inProgress statu icons if toggle takes more than debounce time+ // Show progress only after the debounce interval._debouncer.run(() => Future(() {if (!mounted) return;@@ -137,9 +138,7 @@ class _ToggleSwitchWidgetState extends State<ToggleSwitchWidget> {await widget.onChanged.call().onError((error, stackTrace) => _debouncer.cancelDebounceTimer(),);- //for toggle feedback on short unsuccessful onChangedawait _feedbackOnUnsuccessfulToggle(stopwatch);- //debouncer gets canceled if onChanged takes less than debounce time_debouncer.cancelDebounceTimer();final newValue = widget.value.call();diff --git a/mobile/apps/photos/lib/ui/home/memories/full_screen_memory.dart b/mobile/apps/photos/lib/ui/home/memories/full_screen_memory.dartindex 8b6d05b449..2663df952d 100644--- a/mobile/apps/photos/lib/ui/home/memories/full_screen_memory.dart+++ b/mobile/apps/photos/lib/ui/home/memories/full_screen_memory.dart@@ -50,22 +50,6 @@ const _memoryCaptionActionBarGap = 4.0;const _memoryCaptionLineHeight = 16.0;const _memoryCaptionScrimTopPadding = 12.0;-//There are two states of variables that FullScreenMemory depends on:-//1. The list of memories-//2. The current index of the page view--//1-//Only when items are deleted will list of memories change and this requires the-//whole screen to be rebuild. So the InheritedWidget is updated using the Updater-//widget which will then lead to a rebuild of all widgets that call-//InheritedWidget.of(context).--//2-//There are widgets that doesn't come inside the PageView that needs to rebuild-//with new state when page index is changed. So the index is stored in a-//ValueNotifier inside the InheritedWidget and the widgets that need to change-//are wrapped in a ValueListenableBuilder.-//TODO: Use better naming convention. "Memory" should be a whole memory and//parts of the memory should be called "items".int? _clampedMemoryIndex(int index, int length) {@@ -77,6 +61,8 @@ bool _isValidMemoryIndex(int index, int length) {return index >= 0 && index < length;}+// Deleting a memory changes the shared list and rebuilds the screen. Page+// changes use a ValueNotifier so widgets outside the PageView also rebuild.class FullScreenMemoryDataUpdater extends StatefulWidget {final List<Memory> memories;final int initialIndex;@@ -319,8 +305,7 @@ class FullScreenMemoryData extends InheritedWidget {@overridebool updateShouldNotify(FullScreenMemoryData oldWidget) {- // Checking oldWidget.memories.length != memories.length here doesn't work- //because the old widget and new widget reference the same memories list.+ // Lengths cannot detect changes because both widgets share the memory list.return true;}}diff --git a/mobile/apps/photos/lib/ui/home/memories/memories_widget.dart b/mobile/apps/photos/lib/ui/home/memories/memories_widget.dartindex 6f1372716a..f3b69279c7 100644--- a/mobile/apps/photos/lib/ui/home/memories/memories_widget.dart+++ b/mobile/apps/photos/lib/ui/home/memories/memories_widget.dart@@ -29,9 +29,7 @@ class _MemoriesWidgetState extends State<MemoriesWidget> {late double _memoryheight;late double _memoryWidth;- // Cover-warming: delay the first pass so we don't contend with home-screen- // first-frame work, and restart whenever a new memory set arrives. The- // generation counter makes any stale timer's eventual fire a no-op.+ // Delay cover warming past startup; generations invalidate stale work.Timer? _warmTimer;int _warmGeneration = 0;String? _lastWarmSignature;@@ -149,8 +147,7 @@ class _MemoriesWidgetState extends State<MemoriesWidget> {);}- // Orders the memories for the strip: unseen first, then seen. Shared between- // the prefetch pass and the UI so they agree on each visual slot.+ // Keep prefetch and UI on the same unseen-first ordering.List<SmartMemory> _orderForStrip(List<SmartMemory> memories) {final List<SmartMemory> orderedMemories = [];final List<SmartMemory> seen = [];@@ -210,11 +207,7 @@ class _MemoriesWidgetState extends State<MemoriesWidget> {.join(',');}- // Kill any pending or in-flight warm pass: cancels the delay timer, bumps- // the generation so a running warmMemoryCovers loop exits at its next- // stillActive check, clears pending video work, and clears the last-warmed- // marker so a subsequent dataset re-schedules even if it's the same- // reference as before.+ // Invalidate in-flight work and allow the same dataset to be scheduled again.void _cancelPendingWarm() {_warmTimer?.cancel();_warmTimer = null;diff --git a/mobile/apps/photos/lib/ui/home/memories/memory_cover_widget.dart b/mobile/apps/photos/lib/ui/home/memories/memory_cover_widget.dartindex 425fd20a8e..d141338564 100644--- a/mobile/apps/photos/lib/ui/home/memories/memory_cover_widget.dart+++ b/mobile/apps/photos/lib/ui/home/memories/memory_cover_widget.dart@@ -36,8 +36,7 @@ class MemoryCoverWidget extends StatefulWidget {class _MemoryCoverWidgetState extends State<MemoryCoverWidget> {@overrideWidget build(BuildContext context) {- //memories will be empty if all memories are deleted and setState is called- //after FullScreenMemory screen is popped+ // The list can be empty after deleting every memory and returning here.final memories = widget.smartMemory.memories;if (memories.isEmpty) {return const SizedBox.shrink();diff --git a/mobile/apps/photos/lib/ui/map/map_pull_up_gallery.dart b/mobile/apps/photos/lib/ui/map/map_pull_up_gallery.dartindex 662d39169e..8ad7ad7df0 100644--- a/mobile/apps/photos/lib/ui/map/map_pull_up_gallery.dart+++ b/mobile/apps/photos/lib/ui/map/map_pull_up_gallery.dart@@ -69,8 +69,7 @@ class _MapPullUpGalleryState extends State<MapPullUpGallery> {snap: true,snapSizes: const [0.5],builder: (context, scrollController) {- //Must use cached widget here to avoid rebuilds when DraggableScrollableSheet- //is snapped to it's initialChildSize+ // Keep snapping the sheet from rebuilding its contents.cachedScrollableContent ??= cacheScrollableContent(scrollController,context,@@ -80,7 +79,7 @@ class _MapPullUpGalleryState extends State<MapPullUpGallery> {},),DeferPointer(- //This is to make the FileSelectionOverlayBar respect SafeArea+ // Restore the view's safe-area insets for the overlay.child: MediaQuery(data: MediaQueryData.fromView(View.of(context)),child: FileSelectionOverlayBar(@@ -141,7 +140,6 @@ class _MapPullUpGalleryState extends State<MapPullUpGallery> {final images = snapshot.data!;logger.info("Visible images: ${images.length}");- //To retain only selected files that are in view (visible)WidgetsBinding.instance.addPostFrameCallback((timeStamp) {_selectedFiles.retainFiles(images.toSet());});diff --git a/mobile/apps/photos/lib/ui/settings/backup/backup_settings_screen.dart b/mobile/apps/photos/lib/ui/settings/backup/backup_settings_screen.dartindex 89b66f3291..97ae40e883 100644--- a/mobile/apps/photos/lib/ui/settings/backup/backup_settings_screen.dart+++ b/mobile/apps/photos/lib/ui/settings/backup/backup_settings_screen.dart@@ -230,7 +230,6 @@ class _BackupOnlyNewPhotosToggle extends StatelessWidget {final hasAllFoldersSelected =backupPreferenceService.hasSelectedAllFoldersForBackup;- // Hide "Continue anyway" if user skipped permission and first import not donefinal allowContinueAnyway =!backupPreferenceService.hasSkippedOnboardingPermission ||LocalSyncService.instance.hasCompletedFirstImport();diff --git a/mobile/apps/photos/lib/ui/social/comments_screen.dart b/mobile/apps/photos/lib/ui/social/comments_screen.dartindex 20ee9443db..b5382fec1a 100644--- a/mobile/apps/photos/lib/ui/social/comments_screen.dart+++ b/mobile/apps/photos/lib/ui/social/comments_screen.dart@@ -407,7 +407,7 @@ class _FileCommentsBottomSheetState extends State<FileCommentsBottomSheet> {WidgetsBinding.instance.addPostFrameCallback((_) {if (!mounted || !_scrollController.hasClients) return;- // Phase 1: Jump to approximate position to bring item into view+ // Jump close enough to build the item before using ensureVisible.const estimatedItemHeight = 120.0;final maxScroll = _scrollController.position.maxScrollExtent;final scrollPosition = (index * estimatedItemHeight).clamp(@@ -417,7 +417,6 @@ class _FileCommentsBottomSheetState extends State<FileCommentsBottomSheet> {_scrollController.jumpTo(scrollPosition);- // Phase 2: After item is built, use ensureVisible for precise positioningWidgetsBinding.instance.addPostFrameCallback((_) {if (!mounted) return;final context = _highlightedCommentKey?.currentContext;@@ -433,8 +432,8 @@ class _FileCommentsBottomSheetState extends State<FileCommentsBottomSheet> {}Future<void> _scrollToParentComment(String parentCommentID) async {- _scrollTargetCommentID =- parentCommentID; // Set immediately for race detection+ // Set before loading so another tap can cancel this scroll.+ _scrollTargetCommentID = parentCommentID;int index = _comments.indexWhere((c) => c.id == parentCommentID);@@ -446,7 +445,6 @@ class _FileCommentsBottomSheetState extends State<FileCommentsBottomSheet> {while (_hasMoreComments) {await _loadMoreComments();- // Check if user tapped a different parent (race condition)if (_scrollTargetCommentID != null &&_scrollTargetCommentID != parentCommentID) {return; // Abort, another scroll is in progress@@ -468,7 +466,7 @@ class _FileCommentsBottomSheetState extends State<FileCommentsBottomSheet> {WidgetsBinding.instance.addPostFrameCallback((_) {if (!mounted || !_scrollController.hasClients) return;- // Phase 1: Jump to approximate position+ // Jump close enough to build the item before using ensureVisible.const estimatedItemHeight = 120.0;final maxScroll = _scrollController.position.maxScrollExtent;final scrollPosition = (index * estimatedItemHeight).clamp(@@ -477,7 +475,6 @@ class _FileCommentsBottomSheetState extends State<FileCommentsBottomSheet> {);_scrollController.jumpTo(scrollPosition);- // Phase 2: Precise scroll with ensureVisibleWidgetsBinding.instance.addPostFrameCallback((_) {if (!mounted) return;final context = _scrollTargetKey?.currentContext;@@ -545,10 +542,9 @@ class _FileCommentsBottomSheetState extends State<FileCommentsBottomSheet> {final collectionID = _selectedCollectionID;final replyingTo = _replyingTo;- // Mark as sending internally (blocks duplicate sends) but don't show UI yet+ // Block duplicate sends immediately; show progress only after 400 ms._sendState = SendButtonState.sending;- // Only show loading indicator after 400ms delay_sendLoadingTimer = Timer(const Duration(milliseconds: 400), () {if (mounted && _sendState == SendButtonState.sending) {setState(() {});@@ -791,8 +787,8 @@ class _FileCommentsBottomSheetState extends State<FileCommentsBottomSheet> {final isHighlighted =comment.id == _highlightedCommentID ||comment.id == _scrollTargetHighlightID;- // Use widget.highlightCommentID (not state) to keep key stable after dismiss- // Priority: highlightCommentID (deep link) > scrollTargetCommentID (tap)+ // Keep the deep-link key stable after its highlight+ // is dismissed.final key =(comment.id == widget.highlightCommentID)? (_highlightedCommentKey ??= GlobalKey())@@ -833,7 +829,7 @@ class _FileCommentsBottomSheetState extends State<FileCommentsBottomSheet> {_scrollTargetHighlightID = null;}});- // Don't clear _highlightedCommentKey - prevents avatar flicker+ // Keep the key to prevent avatar flicker.}},onParentQuoteTap: comment.isReplydiff --git a/mobile/apps/photos/lib/ui/tabs/home_widget.dart b/mobile/apps/photos/lib/ui/tabs/home_widget.dartindex d902df3899..739d38078e 100644--- a/mobile/apps/photos/lib/ui/tabs/home_widget.dart+++ b/mobile/apps/photos/lib/ui/tabs/home_widget.dart@@ -247,9 +247,7 @@ class _HomeWidgetState extends State<HomeWidget> {) async {if (mounted && event.status == SyncStatus.completedFirstGalleryImport) {Duration delayInRefresh = const Duration(milliseconds: 0);- // Loading page will redirect to BackupFolderSelectionPage.- // To avoid showing folder hook in middle during routing,- // delay state refresh for home page+ // Let navigation to BackupFolderSelectionPage finish before rebuilding.if (!permissionService.hasGrantedLimitedPermissions()) {delayInRefresh = const Duration(milliseconds: 250);}@@ -864,7 +862,6 @@ class _HomeWidgetState extends State<HomeWidget> {key: _scaffoldKey,drawerScrimColor: getEnteColorScheme(context).strokeFainter,drawerEnableOpenDragGesture: false,- //using a hack instead of enabling this as enabling this will create other problemsdrawer: enableDrawer? ConstrainedBox(constraints: const BoxConstraints(maxWidth: 430),@@ -1005,9 +1002,7 @@ class _HomeWidgetState extends State<HomeWidget> {if (_sharedFiles != null &&_sharedFiles!.isNotEmpty &&_shouldRenderCreateCollectionSheet) {- //The gallery is getting rebuilt for some reason when the keyboard is up.- //So to stop showing multiple CreateCollectionSheets, this flag- //needs to be set to false the first time it is rendered.+ // Clear this before opening so rebuilds cannot open duplicate sheets._shouldRenderCreateCollectionSheet = false;ReceiveSharingIntent.instance.reset();Future.delayed(const Duration(milliseconds: 10), () {diff --git a/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_page.dart b/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_page.dartindex 20762ed6a4..5b3cd62b74 100644--- a/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_page.dart+++ b/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_page.dart@@ -114,8 +114,7 @@ class _ImageEditorPageState extends State<ImageEditorPage> {"_edited_" +DateTime.now().microsecondsSinceEpoch.toString() +".JPEG";- //Disabling notifications for assets changing to insert the file into- //files db before triggering a sync.+ // Insert into FilesDB before asset-change notifications resume.await PhotoManager.stopChangeNotify();hasStoppedChangeNotify = true;final AssetEntity newAsset = await (PhotoManager.editor.saveImage(diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/component/sectioned_sliver_list.dart b/mobile/apps/photos/lib/ui/viewer/gallery/component/sectioned_sliver_list.dartindex 821eed8329..29e745ebd6 100644--- a/mobile/apps/photos/lib/ui/viewer/gallery/component/sectioned_sliver_list.dart+++ b/mobile/apps/photos/lib/ui/viewer/gallery/component/sectioned_sliver_list.dart@@ -162,7 +162,6 @@ class _RenderSliverKnownExtentBoxAdaptor extends RenderSliverMultiBoxAdaptor {index: firstIndex,layoutOffset: indexToLayoutOffset(firstIndex),)) {- // There are either no children, or we are past the end of all our children.double max;if (firstIndex <= 0) {max = 0.0;@@ -217,7 +216,6 @@ class _RenderSliverKnownExtentBoxAdaptor extends RenderSliverMultiBoxAdaptor {after: trailingChildWithLayout,);if (child == null) {- // We have run out of children.final layout = sectionAtIndex(index) ?? sectionLayouts.last;estimatedMaxScrollOffset = layout.maxOffset;break;diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/jump_to_date_gallery.dart b/mobile/apps/photos/lib/ui/viewer/gallery/jump_to_date_gallery.dartindex 577ffa02c5..c59cf983f4 100644--- a/mobile/apps/photos/lib/ui/viewer/gallery/jump_to_date_gallery.dart+++ b/mobile/apps/photos/lib/ui/viewer/gallery/jump_to_date_gallery.dart@@ -97,7 +97,7 @@ class _JumpToDateGalleryState extends State<JumpToDateGallery> {_loadState = GalleryLoadState.waitingForGalleryFinalBuildToComplete;});- // Wait for gallery to build, then make it visible+ // Wait for the gallery's final build before revealing it.Future.delayed(const Duration(milliseconds: 300), () {if (mounted) {setState(() {diff --git a/mobile/apps/photos/lib/utils/delete_file_util.dart b/mobile/apps/photos/lib/utils/delete_file_util.dartindex 5f4d297397..996ee9ba58 100644--- a/mobile/apps/photos/lib/utils/delete_file_util.dart+++ b/mobile/apps/photos/lib/utils/delete_file_util.dart@@ -103,7 +103,6 @@ Future<List<EnteFile>> deleteFilesFromEverywhere(final List<EnteFile> deletedFiles = [];for (final file in files) {if (file.localID != null) {- // Handle only files deleted, moved to trash, or already missing.if (removedIDs.contains(file.localID) ||alreadyDeletedIDs.contains(file.localID)) {deletedFiles.add(file);@@ -253,7 +252,6 @@ Future<List<EnteFile>> deleteFilesOnDeviceOnly(final List<EnteFile> deletedFiles = [];final List<int> uploadedFileIDsToClear = [];for (final file in files) {- // Handle only files deleted, moved to trash, or already missing.if (removedIDs.contains(file.localID) ||alreadyDeletedIDs.contains(file.localID)) {deletedFiles.add(file);@@ -324,8 +322,7 @@ Future<bool> deleteFromTrash(BuildContext context, List<EnteFile> files) async {source: "deleteFromTrash",),);- //the FilesUpdateEvent is not reloading trash on permanently removing- //files, so need to fire ForceReloadTrashPageEvent+ // FilesUpdatedEvent does not reload Trash here.Bus.instance.fire(ForceReloadTrashPageEvent());} catch (e, s) {_logger.info("failed to delete from trash", e, s);diff --git a/mobile/apps/photos/lib/utils/hierarchical_search_util.dart b/mobile/apps/photos/lib/utils/hierarchical_search_util.dartindex c5e90e3e13..b460808bc7 100644--- a/mobile/apps/photos/lib/utils/hierarchical_search_util.dart+++ b/mobile/apps/photos/lib/utils/hierarchical_search_util.dart@@ -687,8 +687,6 @@ List<HierarchicalSearchFilter> getRecommendedFiltersForAppBar(int index = 0;final totalRecommendations = recommendations.length;- // Add the most relevant filter from each type available in the first half of- // the recommendations listfor (final filter in recommendations) {if (mostRelevantFilterFromEachType.every((element) => element.runtimeType != filter.runtimeType,diff --git a/mobile/apps/photos/lib/utils/validator_util.dart b/mobile/apps/photos/lib/utils/validator_util.dartindex 5edd559c94..221017b8e9 100644--- a/mobile/apps/photos/lib/utils/validator_util.dart+++ b/mobile/apps/photos/lib/utils/validator_util.dart@@ -31,7 +31,6 @@ void validatePreVerificationStateCheck(if (keyAttr.memLimit! <= 0 || keyAttr.opsLimit! <= 0) {throw ArgumentError("Key mem/OpsLimit can not be <0");}- // check password encoding issuestry {final Uint8List passwordL = utf8.encode(password!);try {diff --git a/mobile/apps/photos/plugins/ente_crypto/lib/src/models/encryption_result.dart b/mobile/apps/photos/plugins/ente_crypto/lib/src/models/encryption_result.dartindex 4d82d099c7..f2097f832f 100644--- a/mobile/apps/photos/plugins/ente_crypto/lib/src/models/encryption_result.dart+++ b/mobile/apps/photos/plugins/ente_crypto/lib/src/models/encryption_result.dart@@ -10,9 +10,8 @@ class EncryptionResult {}class FileEncryptResult {- // Key using which the file is encryptedfinal Uint8List key;- // Header used for decrypting the file. This is stored in DB. We need both key and header to decrypt the file.+ // Store this in the database; decryption requires both the header and key.final Uint8List header;final String? fileMd5;final List<String>? partMd5s;diff --git a/mobile/apps/photos/plugins/ente_crypto/lib/src/models/errors.dart b/mobile/apps/photos/plugins/ente_crypto/lib/src/models/errors.dartindex ecb8860413..3c42fd8285 100644--- a/mobile/apps/photos/plugins/ente_crypto/lib/src/models/errors.dart+++ b/mobile/apps/photos/plugins/ente_crypto/lib/src/models/errors.dart@@ -25,7 +25,6 @@ extension FutureErrorHandling<T> on Future<T> {throw PartialReadException(msg);}if (msg.contains(kVerificationErrorTag)) {- // Extract the actual message after the tagfinal parts = msg.split(kVerificationErrorTag + ':');final errorMessage = parts.length > 1 ? parts[1].trim() : msg;throw VerificationError(errorMessage);@@ -40,7 +39,6 @@ const kStreamPullError = 'crypto_secretstream_xchacha20poly1305_pull';const kVerificationErrorTag = 'VerificationError';const kBitFlipErrorTag = 'BitFlipDetected';-// Exception counterpart for upstream handling via catchError chainsclass PartialReadException implements Exception {final String message;PartialReadException(this.message);diff --git a/mobile/apps/photos/pubspec.yaml b/mobile/apps/photos/pubspec.yamlindex ba94299a3e..b4598243fd 100644--- a/mobile/apps/photos/pubspec.yaml+++ b/mobile/apps/photos/pubspec.yaml@@ -1,17 +1,6 @@name: photosdescription: ente photos application-# The following defines the version and build number for your application.-# A version number is three numbers separated by dots, like 1.2.43-# followed by an optional build number separated by a +.q-# Both the version and the builder number may be overridden in flutter-# build by specifying --build-name and --build-number, respectively.-# In Android, build-name is used as versionName while build-number used as versionCode.-# Read more about Android versioning at https://developer.android.com/studio/publish/versioning-# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.-# Read more about iOS versioning at-# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html-version: 1.3.62+2158publish_to: none@@ -31,7 +20,7 @@ dependencies:cached_network_image: 3.4.1camera: 0.11.2+1chewie: 1.13.0- collection: 1.19.1 #dart+ collection: 1.19.1computer: # logged task name in verbose in forkgit:url: https://github.com/ente/computer.git@@ -183,7 +172,7 @@ dependencies:native_video_player: 4.0.1package_info_plus: 8.3.1password_strength: 0.2.0- path: 1.9.1 #dart+ path: 1.9.1path_provider: 2.1.5path_provider_foundation: 2.6.0permission_handler: 12.0.1@@ -297,17 +286,8 @@ flutter_native_splash:android_gravity: centerios_content_mode: centerandroid_12:- # The image parameter sets the splash screen icon image. If this parameter is not specified,- # the app's launcher icon will be used instead.- # Please note that the splash screen will be clipped to a circle on the center of the screen.- # App icon without an icon background: This should be 1152Γ1152 pixels, and fit within a circle- # 768 pixels in diameter.image: assets/splash-screen-icon.png-# For information on the generic Dart part of this file, see the-# following page: https://dart.dev/tools/pub/pubspec--# The following section is specific to Flutter.flutter:assets:- assets/@@ -337,41 +317,6 @@ flutter:- asset: fonts/Nunito-Black.ttfweight: 900- # The following line ensures that the Material Icons font is- # included with your application, so that you can use the icons in- # the material Icons class.uses-material-design: true- # Flutter localizationgenerate: true-- # To add assets to your application, add an assets section, like this:- # assets:- # - images/a_dot_burr.jpeg- # - images/a_dot_ham.jpeg-- # An image asset can refer to one or more resolution-specific "variants", see- # https://flutter.dev/assets-and-images/#resolution-aware.-- # For details regarding adding assets from package dependencies, see- # https://flutter.dev/assets-and-images/#from-packages-- # To add custom fonts to your application, add a fonts section here,- # in this "flutter" section. Each entry in this list should have a- # "family" key with the font family name, and a "fonts" key with a- # list giving the asset and other descriptors for the font. For- # example:- # fonts:- # - family: Schyler- # fonts:- # - asset: fonts/Schyler-Regular.ttf- # - asset: fonts/Schyler-Italic.ttf- # style: italic- # - family: Trajan Pro- # fonts:- # - asset: fonts/TrajanPro.ttf- # - asset: fonts/TrajanPro_Bold.ttf- # weight: 700- #- # For details regarding fonts from package dependencies,- # see https://flutter.dev/custom-fonts/#from-packagesdiff --git a/mobile/apps/photos/rust_builder/android/build.gradle b/mobile/apps/photos/rust_builder/android/build.gradleindex ce07417cd1..dd84cc2ea9 100644--- a/mobile/apps/photos/rust_builder/android/build.gradle+++ b/mobile/apps/photos/rust_builder/android/build.gradle@@ -1,5 +1,3 @@-// The Android Gradle Plugin builds the native code with the Android NDK.-group 'com.flutter_rust_bridge.ente_photos_rust'version '1.0'@@ -10,7 +8,6 @@ buildscript {}dependencies {- // The Android Gradle Plugin knows how to build native code with the NDK.classpath 'com.android.tools.build:gradle:7.3.0'}}@@ -33,10 +30,7 @@ android {// to bump the version in their app.compileSdkVersion 33- // Use the NDK version- // declared in /android/app/build.gradle file of the Flutter project.- // Replace it with a version number if this plugin requires a specfic NDK version.- // (e.g. ndkVersion "23.1.7779620")+ // Keep in sync with android/app/build.gradle.ndkVersion "28.2.13676358"compileOptions {diff --git a/mobile/apps/photos/rust_builder/cargokit/build_pod.sh b/mobile/apps/photos/rust_builder/cargokit/build_pod.shindex 3714ee190d..58a2005ebb 100755--- a/mobile/apps/photos/rust_builder/cargokit/build_pod.sh+++ b/mobile/apps/photos/rust_builder/cargokit/build_pod.sh@@ -11,28 +11,20 @@ NEW_PATH=`echo $PATH | tr ":" "\n" | grep -v "Contents/Developer/" | tr "\n" ":"export PATH=${NEW_PATH%?} # remove trailing :-# Platform name (macosx, iphoneos, iphonesimulator)export CARGOKIT_DARWIN_PLATFORM_NAME=$PLATFORM_NAME-# Arctive architectures (arm64, armv7, x86_64), space separated.export CARGOKIT_DARWIN_ARCHS=$ARCHS-# Current build configuration (Debug, Release)export CARGOKIT_CONFIGURATION=$CONFIGURATION-# Path to directory containing Cargo.toml.export CARGOKIT_MANIFEST_DIR=$PODS_TARGET_SRCROOT/$1-# Temporary directory for build artifacts.export CARGOKIT_TARGET_TEMP_DIR=$TARGET_TEMP_DIR-# Output directory for final artifacts.export CARGOKIT_OUTPUT_DIR=$PODS_CONFIGURATION_BUILD_DIR/$PRODUCT_NAME-# Directory to store built tool artifacts.export CARGOKIT_TOOL_TEMP_DIR=$TARGET_TEMP_DIR/build_tool-# Directory inside root project. Not necessarily the top level directory of root project.export CARGOKIT_ROOT_PROJECT_DIR=$SRCROOTFLUTTER_EXPORT_BUILD_ENVIRONMENT=(diff --git a/mobile/apps/photos/rust_builder/cargokit/build_tool/analysis_options.yaml b/mobile/apps/photos/rust_builder/cargokit/build_tool/analysis_options.yamlindex 0e16a8b092..2f58c85614 100644--- a/mobile/apps/photos/rust_builder/cargokit/build_tool/analysis_options.yaml+++ b/mobile/apps/photos/rust_builder/cargokit/build_tool/analysis_options.yaml@@ -1,34 +1,9 @@# This is copied from Cargokit (which is the official way to use it currently)# Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin-# This file configures the static analysis results for your project (errors,-# warnings, and lints).-#-# This enables the 'recommended' set of lints from `package:lints`.-# This set helps identify many issues that may lead to problems when running-# or consuming Dart code, and enforces writing Dart using a single, idiomatic-# style and format.-#-# If you want a smaller set of lints you can change this to specify-# 'package:lints/core.yaml'. These are just the most critical lints-# (the recommended set includes the core lints).-# The core lints are also what is used by pub.dev for scoring packages.-include: package:lints/recommended.yaml-# Uncomment the following section to specify additional rules.-linter:rules:- prefer_relative_imports- directives_ordering--# analyzer:-# exclude:-# - path/to/excluded/files/**--# For more information about the core and recommended set of lints, see-# https://dart.dev/go/core-lints--# For additional information about configuring this file, see-# https://dart.dev/guides/language/analysis-optionsdiff --git a/mobile/apps/photos/rust_builder/cargokit/build_tool/bin/build_tool.dart b/mobile/apps/photos/rust_builder/cargokit/build_tool/bin/build_tool.dartindex 268eb524dc..1bd58423b8 100644--- a/mobile/apps/photos/rust_builder/cargokit/build_tool/bin/build_tool.dart+++ b/mobile/apps/photos/rust_builder/cargokit/build_tool/bin/build_tool.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'package:build_tool/build_tool.dart' as build_tool;diff --git a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/build_tool.dart b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/build_tool.dartindex 7c1bb750a4..09fabf2ceb 100644--- a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/build_tool.dart+++ b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/build_tool.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'src/build_tool.dart' as build_tool;diff --git a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/android_environment.dart b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/android_environment.dartindex 757bf2dcbc..8811bdae6d 100644--- a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/android_environment.dart+++ b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/android_environment.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';import 'dart:isolate';@@ -38,19 +38,14 @@ class AndroidEnvironment {runCommand(clang, [target, ...args]);}- /// Full path to Android SDK.final String sdkPath;- /// Full version of Android NDK.final String ndkVersion;- /// Minimum supported SDK version.final int minSdkVersion;- /// Target directory for build artifacts.final String targetTempDir;- /// Target being built.final Target target;bool ndkIsInstalled() {diff --git a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/artifacts_provider.dart b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/artifacts_provider.dartindex 735bb85e8a..2544c2eaf0 100644--- a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/artifacts_provider.dart+++ b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/artifacts_provider.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';@@ -16,10 +16,8 @@ import 'rustup.dart';import 'target.dart';class Artifact {- /// File system location of the artifact.final String path;- /// Actual file name that the artifact should have in destination folder.final String finalFileName;AritifactType get type {diff --git a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/build_cmake.dart b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/build_cmake.dartindex 560a52ef51..4bde10c5a9 100644--- a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/build_cmake.dart+++ b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/build_cmake.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';diff --git a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/build_gradle.dart b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/build_gradle.dartindex 979a7d6c56..8a55109cb3 100644--- a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/build_gradle.dart+++ b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/build_gradle.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';diff --git a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/build_pod.dart b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/build_pod.dartindex 3034e18b9b..aa99f478aa 100644--- a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/build_pod.dart+++ b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/build_pod.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';diff --git a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/build_tool.dart b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/build_tool.dartindex f0e4fd7f5b..634c359d95 100644--- a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/build_tool.dart+++ b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/build_tool.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';diff --git a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/builder.dart b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/builder.dartindex b491a89c8a..6a5ce1fad8 100644--- a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/builder.dart+++ b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/builder.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'package:collection/collection.dart';import 'package:logging/logging.dart';@@ -124,7 +124,6 @@ class RustBuilder {String get _toolchain => _buildOptions?.toolchain.name ?? 'stable';- /// Returns the path of directory containing build artifacts.Future<String> build() async {final extraArgs = _buildOptions?.flags ?? [];final manifestPath = path.join(environment.manifestDir, 'Cargo.toml');diff --git a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/cargo.dart b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/cargo.dartindex 0d8958ff2e..8ed618573d 100644--- a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/cargo.dart+++ b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/cargo.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';diff --git a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/crate_hash.dart b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/crate_hash.dartindex 8dbfb74ffe..b13b286597 100644--- a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/crate_hash.dart+++ b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/crate_hash.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:convert';import 'dart:io';@@ -11,12 +11,6 @@ import 'package:crypto/crypto.dart';import 'package:path/path.dart' as path;class CrateHash {- /// Computes a hash uniquely identifying crate content. This takes into account- /// content all all .rs files inside the src directory, as well as Cargo.toml,- /// Cargo.lock, build.rs and cargokit.yaml.- ///- /// If [tempStorage] is provided, computed hash is stored in a file in that directory- /// and reused on subsequent calls if the crate content hasn't changed.static String compute(String manifestDir, {String? tempStorage}) {return CrateHash._(manifestDir: manifestDir,@@ -45,9 +39,6 @@ class CrateHash {}}- /// Computes a quick hash based on files stat (without reading contents). This- /// is used to cache the real hash, which is slower to compute since it involves- /// reading every single file.String _computeQuickHash(List<File> files) {final output = AccumulatorSink<Digest>();final input = sha256.startChunkedConversion(output);diff --git a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/environment.dart b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/environment.dartindex 996483a180..34680af042 100644--- a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/environment.dart+++ b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/environment.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';@@ -8,37 +8,27 @@ extension on String {}class Environment {- /// Current build configuration (debug or release).static String get configuration =>_getEnv("CARGOKIT_CONFIGURATION").toLowerCase();static bool get isDebug => configuration == 'debug';static bool get isRelease => configuration == 'release';- /// Temporary directory where Rust build artifacts are placed.static String get targetTempDir => _getEnv("CARGOKIT_TARGET_TEMP_DIR");- /// Final output directory where the build artifacts are placed.static String get outputDir => _getEnvPath('CARGOKIT_OUTPUT_DIR');- /// Path to the crate manifest (containing Cargo.toml).static String get manifestDir => _getEnvPath('CARGOKIT_MANIFEST_DIR');- /// Directory inside root project. Not necessarily root folder. Symlinks are- /// not resolved on purpose.+ // Symlinks are not resolved on purpose.static String get rootProjectDir => _getEnv('CARGOKIT_ROOT_PROJECT_DIR');- // Pod-- /// Platform name (macosx, iphoneos, iphonesimulator).static String get darwinPlatformName =>_getEnv("CARGOKIT_DARWIN_PLATFORM_NAME");- /// List of architectures to build for (arm64, armv7, x86_64).static List<String> get darwinArchs =>_getEnv("CARGOKIT_DARWIN_ARCHS").split(' ');- // Gradlestatic String get minSdkVersion => _getEnv("CARGOKIT_MIN_SDK_VERSION");static String get ndkVersion => _getEnv("CARGOKIT_NDK_VERSION");static String get sdkPath => _getEnvPath("CARGOKIT_SDK_DIR");@@ -46,7 +36,6 @@ class Environment {static List<String> get targetPlatforms =>_getEnv("CARGOKIT_TARGET_PLATFORMS").split(',');- // CMAKEstatic String get targetPlatform => _getEnv("CARGOKIT_TARGET_PLATFORM");static String _getEnv(String key) {diff --git a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/logging.dart b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/logging.dartindex da1e36342b..72cd6848f0 100644--- a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/logging.dart+++ b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/logging.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';diff --git a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/options.dart b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/options.dartindex c9279ffa20..a952b50771 100644--- a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/options.dart+++ b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/options.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';@@ -17,29 +17,17 @@ import 'rustup.dart';final _log = Logger('options');-/// A class for exceptions that have source span information attached.class SourceSpanException implements Exception {// This is a getter so that subclasses can override it.- /// A message describing the exception.String get message => _message;final String _message;// This is a getter so that subclasses can override it.- /// The span associated with this exception.- ///- /// This may be `null` if the source location can't be determined.SourceSpan? get span => _span;final SourceSpan? _span;SourceSpanException(this._message, this._span);- /// Returns a string representation of `this`.- ///- /// [color] may either be a [String], a [bool], or `null`. If it's a string,- /// it indicates an ANSI terminal color escape that should be used to- /// highlight the span's text. If it's `true`, it indicates that the text- /// should be highlighted using the default color. If it's `false` or `null`,- /// it indicates that the text shouldn't be highlighted.@overrideString toString({Object? color}) {if (span == null) return message;@@ -107,7 +95,6 @@ class CargoBuildOptions {}extension on YamlMap {- /// Map that extracts keys so that we can do map case check on them.Map<dynamic, YamlNode> get valueMap =>nodes.map((key, value) => MapEntry(key.value, value));}@@ -163,7 +150,6 @@ class PrecompiledBinaries {}}-/// Cargokit options specified for Rust crate.class CargokitCrateOptions {CargokitCrateOptions({this.cargo = const {}, this.precompiledBinaries});diff --git a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/precompile_binaries.dart b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/precompile_binaries.dartindex cf9b99ae69..fc235ef5cd 100644--- a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/precompile_binaries.dart+++ b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/precompile_binaries.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';diff --git a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/rustup.dart b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/rustup.dartindex e11bde133c..fd012e00fe 100644--- a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/rustup.dart+++ b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/rustup.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';diff --git a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/target.dart b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/target.dartindex 0c567d82e8..dc7145dc45 100644--- a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/target.dart+++ b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/target.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';@@ -97,7 +97,6 @@ class Target {.toList(growable: false);}- /// Returns buildable targets on current host platform ignoring Android targets.static List<Target> buildableTargets() {if (Platform.isLinux) {// Right now we don't support cross-compiling on Linux. So we just returndiff --git a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/util.dart b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/util.dartindex 10ec2a3dba..863ff025f2 100644--- a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/util.dart+++ b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/util.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:convert';import 'dart:io';diff --git a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/verify_binaries.dart b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/verify_binaries.dartindex 4c4b2879ff..d7dc1e5aa6 100644--- a/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/verify_binaries.dart+++ b/mobile/apps/photos/rust_builder/cargokit/build_tool/lib/src/verify_binaries.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';diff --git a/mobile/apps/photos/rust_builder/cargokit/build_tool/pubspec.yaml b/mobile/apps/photos/rust_builder/cargokit/build_tool/pubspec.yamlindex 23867a235a..83147e9e68 100644--- a/mobile/apps/photos/rust_builder/cargokit/build_tool/pubspec.yaml+++ b/mobile/apps/photos/rust_builder/cargokit/build_tool/pubspec.yaml@@ -9,7 +9,6 @@ version: 1.0.0environment:sdk: ">=3.10.0 <4.0.0"-# Add regular dependencies here.dependencies:# these are pinned on purpose because the bundle_tool_runner doesn't have# pubspec.lock. See run_build_tool.shdiff --git a/mobile/apps/photos/rust_builder/cargokit/gradle/plugin.gradle b/mobile/apps/photos/rust_builder/cargokit/gradle/plugin.gradleindex b4d007a941..0acce94b70 100644--- a/mobile/apps/photos/rust_builder/cargokit/gradle/plugin.gradle+++ b/mobile/apps/photos/rust_builder/cargokit/gradle/plugin.gradle@@ -120,7 +120,6 @@ class CargoKitPlugin implements Plugin<Project> {def cargoBuildDir = "${project.buildDir}/build"- // Determine if the project is an application or librarydef isApplication = plugin.project.plugins.hasPlugin('com.android.application')def variants = isApplication ? plugin.project.android.applicationVariants : plugin.project.android.libraryVariantsdiff --git a/mobile/apps/photos/rust_builder/cargokit/run_build_tool.sh b/mobile/apps/photos/rust_builder/cargokit/run_build_tool.shindex 6e594a23d4..ae811e3e15 100755--- a/mobile/apps/photos/rust_builder/cargokit/run_build_tool.sh+++ b/mobile/apps/photos/rust_builder/cargokit/run_build_tool.sh@@ -42,7 +42,6 @@ void main(List<String> args) {}EOF-# Create alias for `shasum` if it does not exist and `sha1sum` existsif ! [ -x "$(command -v shasum)" ] && [ -x "$(command -v sha1sum)" ]; thenshopt -s expand_aliasesalias shasum="sha1sum"@@ -70,7 +69,6 @@ if [ -f "$PACKAGE_HASH_FILE" ]; thenfifi-# Run pub get if needed.if [ ! -f "$PACKAGE_HASH_FILE" ]; then"$DART" pub get --no-precompile"$DART" compile kernel bin/build_tool_runner.dartdiff --git a/mobile/apps/photos/test_driver/perf_driver.dart b/mobile/apps/photos/test_driver/perf_driver.dartindex c1d6ba1694..0f9adcc114 100644--- a/mobile/apps/photos/test_driver/perf_driver.dart+++ b/mobile/apps/photos/test_driver/perf_driver.dart@@ -1,8 +1,6 @@import 'package:flutter_driver/flutter_driver.dart' as driver;import 'package:integration_test/integration_test_driver.dart';-///https://api.flutter.dev/flutter/flutter_driver/TimelineSummary/summaryJson.html-Future<void> main() {return integrationDriver(responseDataCallback: (data) async {@@ -18,7 +16,6 @@ Future<void> main() {'*title of file*',pretty: true,includeSummary: true,- //Specify destination directory for the timeline files.);}},diff --git a/mobile/mobile-tests/locker/flows/locker-add-creds.yaml b/mobile/mobile-tests/locker/flows/locker-add-creds.yamlindex 1c0f293afc..e672679e61 100644--- a/mobile/mobile-tests/locker/flows/locker-add-creds.yaml+++ b/mobile/mobile-tests/locker/flows/locker-add-creds.yaml@@ -22,7 +22,6 @@ appId: io.ente.locker- tapOn: Important- tapOn: Save-# Wait till home screen it not visible- extendedWaitUntil:visible: Add itemtimeout: 10000diff --git a/mobile/mobile-tests/locker/flows/locker-note.yaml b/mobile/mobile-tests/locker/flows/locker-note.yamlindex 5fd55238e6..36d1ebdbba 100644--- a/mobile/mobile-tests/locker/flows/locker-note.yaml+++ b/mobile/mobile-tests/locker/flows/locker-note.yaml@@ -11,7 +11,6 @@ appId: io.ente.locker- tapOn: done- tapOn: Important- tapOn: Save-# Wait till home screen it not visible- extendedWaitUntil:visible: Add itemtimeout: 10000@@ -20,7 +19,6 @@ appId: io.ente.locker- tapOn: Edit- inputText: " edited"- tapOn: Save-# Wait till home screen it not visible- extendedWaitUntil:visible: Edittimeout: 10000diff --git a/mobile/packages/backup_exclusion/lib/backup_exclusion.dart b/mobile/packages/backup_exclusion/lib/backup_exclusion.dartindex 575f3b7b2e..c504776de7 100644--- a/mobile/packages/backup_exclusion/lib/backup_exclusion.dart+++ b/mobile/packages/backup_exclusion/lib/backup_exclusion.dart@@ -8,7 +8,6 @@ final _logger = Logger('BackupExclusion');const _channel = MethodChannel('io.ente.backup_exclusion');// Reapply on every app init: device restores recreate directories without it.-// The operation is idempotent and cheap.Future<void> excludeFromBackup(String path) async {if (!Platform.isIOS) return;await _invokeExcludeFromBackup(path);diff --git a/mobile/packages/ente_components/example/android/app/src/debug/AndroidManifest.xml b/mobile/packages/ente_components/example/android/app/src/debug/AndroidManifest.xmlindex 399f6981d5..bbd7ee7776 100644--- a/mobile/packages/ente_components/example/android/app/src/debug/AndroidManifest.xml+++ b/mobile/packages/ente_components/example/android/app/src/debug/AndroidManifest.xml@@ -1,7 +1,3 @@<manifest xmlns:android="http://schemas.android.com/apk/res/android">- <!-- The INTERNET permission is required for development. Specifically,- the Flutter tool needs it to communicate with the running application- to allow setting breakpoints, to provide hot reload, etc.- --><uses-permission android:name="android.permission.INTERNET"/></manifest>diff --git a/mobile/packages/ente_components/example/android/app/src/main/AndroidManifest.xml b/mobile/packages/ente_components/example/android/app/src/main/AndroidManifest.xmlindex 583a826e76..576fed8fbc 100644--- a/mobile/packages/ente_components/example/android/app/src/main/AndroidManifest.xml+++ b/mobile/packages/ente_components/example/android/app/src/main/AndroidManifest.xml@@ -12,10 +12,6 @@android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"android:hardwareAccelerated="true"android:windowSoftInputMode="adjustResize">- <!-- Specifies an Android theme to apply to this Activity as soon as- the Android process has started. This theme is visible to the user- while the Flutter UI initializes. After that, this theme continues- to determine the Window background behind the Flutter UI. --><meta-dataandroid:name="io.flutter.embedding.android.NormalTheme"android:resource="@style/NormalTheme"diff --git a/mobile/packages/ente_components/example/android/app/src/main/res/drawable-v21/launch_background.xml b/mobile/packages/ente_components/example/android/app/src/main/res/drawable-v21/launch_background.xmlindex f74085f3f6..9e0ba436df 100644--- a/mobile/packages/ente_components/example/android/app/src/main/res/drawable-v21/launch_background.xml+++ b/mobile/packages/ente_components/example/android/app/src/main/res/drawable-v21/launch_background.xml@@ -1,12 +1,5 @@<?xml version="1.0" encoding="utf-8"?>-<!-- Modify this file to customize your launch splash screen --><layer-list xmlns:android="http://schemas.android.com/apk/res/android"><item android:drawable="?android:colorBackground" />- <!-- You can insert your own image assets here -->- <!-- <item>- <bitmap- android:gravity="center"- android:src="@mipmap/launch_image" />- </item> --></layer-list>diff --git a/mobile/packages/ente_components/example/android/app/src/main/res/drawable/launch_background.xml b/mobile/packages/ente_components/example/android/app/src/main/res/drawable/launch_background.xmlindex 304732f884..da2eb26a0e 100644--- a/mobile/packages/ente_components/example/android/app/src/main/res/drawable/launch_background.xml+++ b/mobile/packages/ente_components/example/android/app/src/main/res/drawable/launch_background.xml@@ -1,12 +1,5 @@<?xml version="1.0" encoding="utf-8"?>-<!-- Modify this file to customize your launch splash screen --><layer-list xmlns:android="http://schemas.android.com/apk/res/android"><item android:drawable="@android:color/white" />- <!-- You can insert your own image assets here -->- <!-- <item>- <bitmap- android:gravity="center"- android:src="@mipmap/launch_image" />- </item> --></layer-list>diff --git a/mobile/packages/ente_components/example/android/app/src/main/res/values-night/styles.xml b/mobile/packages/ente_components/example/android/app/src/main/res/values-night/styles.xmlindex 06952be745..c6e7031f33 100644--- a/mobile/packages/ente_components/example/android/app/src/main/res/values-night/styles.xml+++ b/mobile/packages/ente_components/example/android/app/src/main/res/values-night/styles.xml@@ -1,17 +1,8 @@<?xml version="1.0" encoding="utf-8"?><resources>- <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on --><style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">- <!-- Show a splash screen on the activity. Automatically removed when- the Flutter engine draws its first frame --><item name="android:windowBackground">@drawable/launch_background</item></style>- <!-- Theme applied to the Android Window as soon as the process has started.- This theme determines the color of the Android Window while your- Flutter UI initializes, as well as behind your Flutter UI while its- running.-- This Theme is only used starting with V2 of Flutter's Android embedding. --><style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar"><item name="android:windowBackground">?android:colorBackground</item></style>diff --git a/mobile/packages/ente_components/example/android/app/src/main/res/values/styles.xml b/mobile/packages/ente_components/example/android/app/src/main/res/values/styles.xmlindex cb1ef88056..ff81bae863 100644--- a/mobile/packages/ente_components/example/android/app/src/main/res/values/styles.xml+++ b/mobile/packages/ente_components/example/android/app/src/main/res/values/styles.xml@@ -1,17 +1,8 @@<?xml version="1.0" encoding="utf-8"?><resources>- <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off --><style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">- <!-- Show a splash screen on the activity. Automatically removed when- the Flutter engine draws its first frame --><item name="android:windowBackground">@drawable/launch_background</item></style>- <!-- Theme applied to the Android Window as soon as the process has started.- This theme determines the color of the Android Window while your- Flutter UI initializes, as well as behind your Flutter UI while its- running.-- This Theme is only used starting with V2 of Flutter's Android embedding. --><style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar"><item name="android:windowBackground">?android:colorBackground</item></style>diff --git a/mobile/packages/ente_components/example/android/app/src/profile/AndroidManifest.xml b/mobile/packages/ente_components/example/android/app/src/profile/AndroidManifest.xmlindex 399f6981d5..bbd7ee7776 100644--- a/mobile/packages/ente_components/example/android/app/src/profile/AndroidManifest.xml+++ b/mobile/packages/ente_components/example/android/app/src/profile/AndroidManifest.xml@@ -1,7 +1,3 @@<manifest xmlns:android="http://schemas.android.com/apk/res/android">- <!-- The INTERNET permission is required for development. Specifically,- the Flutter tool needs it to communicate with the running application- to allow setting breakpoints, to provide hot reload, etc.- --><uses-permission android:name="android.permission.INTERNET"/></manifest>diff --git a/mobile/packages/ente_qr/pubspec.yaml b/mobile/packages/ente_qr/pubspec.yamlindex e50ba6fc51..afd5520117 100644--- a/mobile/packages/ente_qr/pubspec.yaml+++ b/mobile/packages/ente_qr/pubspec.yaml@@ -18,9 +18,7 @@ dev_dependencies:flutter_test:sdk: flutter-# The following section is specific to Flutter packages.flutter:- # This section identifies this Flutter project as a plugin project.plugin:platforms:android:diff --git a/mobile/packages/log_viewer/pubspec.yaml b/mobile/packages/log_viewer/pubspec.yamlindex 8ecdf0882c..58eadf5e49 100644--- a/mobile/packages/log_viewer/pubspec.yaml+++ b/mobile/packages/log_viewer/pubspec.yaml@@ -10,10 +10,10 @@ dependencies:collection: 1.19.1flutter:sdk: flutter- logging: 1.3.0 # For LogRecord type compatibility+ logging: 1.3.0path: 1.9.1path_provider: 2.1.5- share_plus: 12.0.0 # For log export functionality+ share_plus: 12.0.0sqflite: 2.4.2dev_dependencies:diff --git a/mobile/packages/rust/cargokit/build_pod.sh b/mobile/packages/rust/cargokit/build_pod.shindex ed0e0d987d..acf0115892 100755--- a/mobile/packages/rust/cargokit/build_pod.sh+++ b/mobile/packages/rust/cargokit/build_pod.sh@@ -13,28 +13,20 @@ export PATH=${NEW_PATH%?} # remove trailing :env-# Platform name (macosx, iphoneos, iphonesimulator)export CARGOKIT_DARWIN_PLATFORM_NAME=$PLATFORM_NAME-# Arctive architectures (arm64, armv7, x86_64), space separated.export CARGOKIT_DARWIN_ARCHS=$ARCHS-# Current build configuration (Debug, Release)export CARGOKIT_CONFIGURATION=$CONFIGURATION-# Path to directory containing Cargo.toml.export CARGOKIT_MANIFEST_DIR=$PODS_TARGET_SRCROOT/$1-# Temporary directory for build artifacts.export CARGOKIT_TARGET_TEMP_DIR=$TARGET_TEMP_DIR-# Output directory for final artifacts.export CARGOKIT_OUTPUT_DIR=$PODS_CONFIGURATION_BUILD_DIR/$PRODUCT_NAME-# Directory to store built tool artifacts.export CARGOKIT_TOOL_TEMP_DIR=$TARGET_TEMP_DIR/build_tool-# Directory inside root project. Not necessarily the top level directory of root project.export CARGOKIT_ROOT_PROJECT_DIR=$SRCROOTFLUTTER_EXPORT_BUILD_ENVIRONMENT=(diff --git a/mobile/packages/rust/cargokit/build_tool/analysis_options.yaml b/mobile/packages/rust/cargokit/build_tool/analysis_options.yamlindex 0e16a8b092..2f58c85614 100644--- a/mobile/packages/rust/cargokit/build_tool/analysis_options.yaml+++ b/mobile/packages/rust/cargokit/build_tool/analysis_options.yaml@@ -1,34 +1,9 @@# This is copied from Cargokit (which is the official way to use it currently)# Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin-# This file configures the static analysis results for your project (errors,-# warnings, and lints).-#-# This enables the 'recommended' set of lints from `package:lints`.-# This set helps identify many issues that may lead to problems when running-# or consuming Dart code, and enforces writing Dart using a single, idiomatic-# style and format.-#-# If you want a smaller set of lints you can change this to specify-# 'package:lints/core.yaml'. These are just the most critical lints-# (the recommended set includes the core lints).-# The core lints are also what is used by pub.dev for scoring packages.-include: package:lints/recommended.yaml-# Uncomment the following section to specify additional rules.-linter:rules:- prefer_relative_imports- directives_ordering--# analyzer:-# exclude:-# - path/to/excluded/files/**--# For more information about the core and recommended set of lints, see-# https://dart.dev/go/core-lints--# For additional information about configuring this file, see-# https://dart.dev/guides/language/analysis-optionsdiff --git a/mobile/packages/rust/cargokit/build_tool/bin/build_tool.dart b/mobile/packages/rust/cargokit/build_tool/bin/build_tool.dartindex 268eb524dc..1bd58423b8 100644--- a/mobile/packages/rust/cargokit/build_tool/bin/build_tool.dart+++ b/mobile/packages/rust/cargokit/build_tool/bin/build_tool.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'package:build_tool/build_tool.dart' as build_tool;diff --git a/mobile/packages/rust/cargokit/build_tool/lib/build_tool.dart b/mobile/packages/rust/cargokit/build_tool/lib/build_tool.dartindex 7c1bb750a4..09fabf2ceb 100644--- a/mobile/packages/rust/cargokit/build_tool/lib/build_tool.dart+++ b/mobile/packages/rust/cargokit/build_tool/lib/build_tool.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'src/build_tool.dart' as build_tool;diff --git a/mobile/packages/rust/cargokit/build_tool/lib/src/android_environment.dart b/mobile/packages/rust/cargokit/build_tool/lib/src/android_environment.dartindex 757bf2dcbc..8811bdae6d 100644--- a/mobile/packages/rust/cargokit/build_tool/lib/src/android_environment.dart+++ b/mobile/packages/rust/cargokit/build_tool/lib/src/android_environment.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';import 'dart:isolate';@@ -38,19 +38,14 @@ class AndroidEnvironment {runCommand(clang, [target, ...args]);}- /// Full path to Android SDK.final String sdkPath;- /// Full version of Android NDK.final String ndkVersion;- /// Minimum supported SDK version.final int minSdkVersion;- /// Target directory for build artifacts.final String targetTempDir;- /// Target being built.final Target target;bool ndkIsInstalled() {diff --git a/mobile/packages/rust/cargokit/build_tool/lib/src/artifacts_provider.dart b/mobile/packages/rust/cargokit/build_tool/lib/src/artifacts_provider.dartindex 735bb85e8a..2544c2eaf0 100644--- a/mobile/packages/rust/cargokit/build_tool/lib/src/artifacts_provider.dart+++ b/mobile/packages/rust/cargokit/build_tool/lib/src/artifacts_provider.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';@@ -16,10 +16,8 @@ import 'rustup.dart';import 'target.dart';class Artifact {- /// File system location of the artifact.final String path;- /// Actual file name that the artifact should have in destination folder.final String finalFileName;AritifactType get type {diff --git a/mobile/packages/rust/cargokit/build_tool/lib/src/build_cmake.dart b/mobile/packages/rust/cargokit/build_tool/lib/src/build_cmake.dartindex 560a52ef51..4bde10c5a9 100644--- a/mobile/packages/rust/cargokit/build_tool/lib/src/build_cmake.dart+++ b/mobile/packages/rust/cargokit/build_tool/lib/src/build_cmake.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';diff --git a/mobile/packages/rust/cargokit/build_tool/lib/src/build_gradle.dart b/mobile/packages/rust/cargokit/build_tool/lib/src/build_gradle.dartindex 3416ea032a..5c2e95b032 100644--- a/mobile/packages/rust/cargokit/build_tool/lib/src/build_gradle.dart+++ b/mobile/packages/rust/cargokit/build_tool/lib/src/build_gradle.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';diff --git a/mobile/packages/rust/cargokit/build_tool/lib/src/build_pod.dart b/mobile/packages/rust/cargokit/build_tool/lib/src/build_pod.dartindex 3034e18b9b..aa99f478aa 100644--- a/mobile/packages/rust/cargokit/build_tool/lib/src/build_pod.dart+++ b/mobile/packages/rust/cargokit/build_tool/lib/src/build_pod.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';diff --git a/mobile/packages/rust/cargokit/build_tool/lib/src/build_tool.dart b/mobile/packages/rust/cargokit/build_tool/lib/src/build_tool.dartindex f0e4fd7f5b..634c359d95 100644--- a/mobile/packages/rust/cargokit/build_tool/lib/src/build_tool.dart+++ b/mobile/packages/rust/cargokit/build_tool/lib/src/build_tool.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';diff --git a/mobile/packages/rust/cargokit/build_tool/lib/src/builder.dart b/mobile/packages/rust/cargokit/build_tool/lib/src/builder.dartindex b491a89c8a..6a5ce1fad8 100644--- a/mobile/packages/rust/cargokit/build_tool/lib/src/builder.dart+++ b/mobile/packages/rust/cargokit/build_tool/lib/src/builder.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'package:collection/collection.dart';import 'package:logging/logging.dart';@@ -124,7 +124,6 @@ class RustBuilder {String get _toolchain => _buildOptions?.toolchain.name ?? 'stable';- /// Returns the path of directory containing build artifacts.Future<String> build() async {final extraArgs = _buildOptions?.flags ?? [];final manifestPath = path.join(environment.manifestDir, 'Cargo.toml');diff --git a/mobile/packages/rust/cargokit/build_tool/lib/src/cargo.dart b/mobile/packages/rust/cargokit/build_tool/lib/src/cargo.dartindex 0d8958ff2e..8ed618573d 100644--- a/mobile/packages/rust/cargokit/build_tool/lib/src/cargo.dart+++ b/mobile/packages/rust/cargokit/build_tool/lib/src/cargo.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';diff --git a/mobile/packages/rust/cargokit/build_tool/lib/src/crate_hash.dart b/mobile/packages/rust/cargokit/build_tool/lib/src/crate_hash.dartindex 8dbfb74ffe..b13b286597 100644--- a/mobile/packages/rust/cargokit/build_tool/lib/src/crate_hash.dart+++ b/mobile/packages/rust/cargokit/build_tool/lib/src/crate_hash.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:convert';import 'dart:io';@@ -11,12 +11,6 @@ import 'package:crypto/crypto.dart';import 'package:path/path.dart' as path;class CrateHash {- /// Computes a hash uniquely identifying crate content. This takes into account- /// content all all .rs files inside the src directory, as well as Cargo.toml,- /// Cargo.lock, build.rs and cargokit.yaml.- ///- /// If [tempStorage] is provided, computed hash is stored in a file in that directory- /// and reused on subsequent calls if the crate content hasn't changed.static String compute(String manifestDir, {String? tempStorage}) {return CrateHash._(manifestDir: manifestDir,@@ -45,9 +39,6 @@ class CrateHash {}}- /// Computes a quick hash based on files stat (without reading contents). This- /// is used to cache the real hash, which is slower to compute since it involves- /// reading every single file.String _computeQuickHash(List<File> files) {final output = AccumulatorSink<Digest>();final input = sha256.startChunkedConversion(output);diff --git a/mobile/packages/rust/cargokit/build_tool/lib/src/environment.dart b/mobile/packages/rust/cargokit/build_tool/lib/src/environment.dartindex 996483a180..34680af042 100644--- a/mobile/packages/rust/cargokit/build_tool/lib/src/environment.dart+++ b/mobile/packages/rust/cargokit/build_tool/lib/src/environment.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';@@ -8,37 +8,27 @@ extension on String {}class Environment {- /// Current build configuration (debug or release).static String get configuration =>_getEnv("CARGOKIT_CONFIGURATION").toLowerCase();static bool get isDebug => configuration == 'debug';static bool get isRelease => configuration == 'release';- /// Temporary directory where Rust build artifacts are placed.static String get targetTempDir => _getEnv("CARGOKIT_TARGET_TEMP_DIR");- /// Final output directory where the build artifacts are placed.static String get outputDir => _getEnvPath('CARGOKIT_OUTPUT_DIR');- /// Path to the crate manifest (containing Cargo.toml).static String get manifestDir => _getEnvPath('CARGOKIT_MANIFEST_DIR');- /// Directory inside root project. Not necessarily root folder. Symlinks are- /// not resolved on purpose.+ // Symlinks are not resolved on purpose.static String get rootProjectDir => _getEnv('CARGOKIT_ROOT_PROJECT_DIR');- // Pod-- /// Platform name (macosx, iphoneos, iphonesimulator).static String get darwinPlatformName =>_getEnv("CARGOKIT_DARWIN_PLATFORM_NAME");- /// List of architectures to build for (arm64, armv7, x86_64).static List<String> get darwinArchs =>_getEnv("CARGOKIT_DARWIN_ARCHS").split(' ');- // Gradlestatic String get minSdkVersion => _getEnv("CARGOKIT_MIN_SDK_VERSION");static String get ndkVersion => _getEnv("CARGOKIT_NDK_VERSION");static String get sdkPath => _getEnvPath("CARGOKIT_SDK_DIR");@@ -46,7 +36,6 @@ class Environment {static List<String> get targetPlatforms =>_getEnv("CARGOKIT_TARGET_PLATFORMS").split(',');- // CMAKEstatic String get targetPlatform => _getEnv("CARGOKIT_TARGET_PLATFORM");static String _getEnv(String key) {diff --git a/mobile/packages/rust/cargokit/build_tool/lib/src/logging.dart b/mobile/packages/rust/cargokit/build_tool/lib/src/logging.dartindex da1e36342b..72cd6848f0 100644--- a/mobile/packages/rust/cargokit/build_tool/lib/src/logging.dart+++ b/mobile/packages/rust/cargokit/build_tool/lib/src/logging.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';diff --git a/mobile/packages/rust/cargokit/build_tool/lib/src/options.dart b/mobile/packages/rust/cargokit/build_tool/lib/src/options.dartindex c9279ffa20..a952b50771 100644--- a/mobile/packages/rust/cargokit/build_tool/lib/src/options.dart+++ b/mobile/packages/rust/cargokit/build_tool/lib/src/options.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';@@ -17,29 +17,17 @@ import 'rustup.dart';final _log = Logger('options');-/// A class for exceptions that have source span information attached.class SourceSpanException implements Exception {// This is a getter so that subclasses can override it.- /// A message describing the exception.String get message => _message;final String _message;// This is a getter so that subclasses can override it.- /// The span associated with this exception.- ///- /// This may be `null` if the source location can't be determined.SourceSpan? get span => _span;final SourceSpan? _span;SourceSpanException(this._message, this._span);- /// Returns a string representation of `this`.- ///- /// [color] may either be a [String], a [bool], or `null`. If it's a string,- /// it indicates an ANSI terminal color escape that should be used to- /// highlight the span's text. If it's `true`, it indicates that the text- /// should be highlighted using the default color. If it's `false` or `null`,- /// it indicates that the text shouldn't be highlighted.@overrideString toString({Object? color}) {if (span == null) return message;@@ -107,7 +95,6 @@ class CargoBuildOptions {}extension on YamlMap {- /// Map that extracts keys so that we can do map case check on them.Map<dynamic, YamlNode> get valueMap =>nodes.map((key, value) => MapEntry(key.value, value));}@@ -163,7 +150,6 @@ class PrecompiledBinaries {}}-/// Cargokit options specified for Rust crate.class CargokitCrateOptions {CargokitCrateOptions({this.cargo = const {}, this.precompiledBinaries});diff --git a/mobile/packages/rust/cargokit/build_tool/lib/src/precompile_binaries.dart b/mobile/packages/rust/cargokit/build_tool/lib/src/precompile_binaries.dartindex cf9b99ae69..fc235ef5cd 100644--- a/mobile/packages/rust/cargokit/build_tool/lib/src/precompile_binaries.dart+++ b/mobile/packages/rust/cargokit/build_tool/lib/src/precompile_binaries.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';diff --git a/mobile/packages/rust/cargokit/build_tool/lib/src/rustup.dart b/mobile/packages/rust/cargokit/build_tool/lib/src/rustup.dartindex e11bde133c..fd012e00fe 100644--- a/mobile/packages/rust/cargokit/build_tool/lib/src/rustup.dart+++ b/mobile/packages/rust/cargokit/build_tool/lib/src/rustup.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';diff --git a/mobile/packages/rust/cargokit/build_tool/lib/src/target.dart b/mobile/packages/rust/cargokit/build_tool/lib/src/target.dartindex 0c567d82e8..dc7145dc45 100644--- a/mobile/packages/rust/cargokit/build_tool/lib/src/target.dart+++ b/mobile/packages/rust/cargokit/build_tool/lib/src/target.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';@@ -97,7 +97,6 @@ class Target {.toList(growable: false);}- /// Returns buildable targets on current host platform ignoring Android targets.static List<Target> buildableTargets() {if (Platform.isLinux) {// Right now we don't support cross-compiling on Linux. So we just returndiff --git a/mobile/packages/rust/cargokit/build_tool/lib/src/util.dart b/mobile/packages/rust/cargokit/build_tool/lib/src/util.dartindex 10ec2a3dba..863ff025f2 100644--- a/mobile/packages/rust/cargokit/build_tool/lib/src/util.dart+++ b/mobile/packages/rust/cargokit/build_tool/lib/src/util.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:convert';import 'dart:io';diff --git a/mobile/packages/rust/cargokit/build_tool/lib/src/verify_binaries.dart b/mobile/packages/rust/cargokit/build_tool/lib/src/verify_binaries.dartindex 4c4b2879ff..d7dc1e5aa6 100644--- a/mobile/packages/rust/cargokit/build_tool/lib/src/verify_binaries.dart+++ b/mobile/packages/rust/cargokit/build_tool/lib/src/verify_binaries.dart@@ -1,5 +1,5 @@-/// This is copied from Cargokit (which is the official way to use it currently)-/// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtin+// This is copied from Cargokit (which is the official way to use it currently)+// Details: https://fzyzcjy.github.io/flutter_rust_bridge/manual/integrate/builtinimport 'dart:io';diff --git a/mobile/packages/rust/cargokit/build_tool/pubspec.yaml b/mobile/packages/rust/cargokit/build_tool/pubspec.yamlindex 23867a235a..83147e9e68 100644--- a/mobile/packages/rust/cargokit/build_tool/pubspec.yaml+++ b/mobile/packages/rust/cargokit/build_tool/pubspec.yaml@@ -9,7 +9,6 @@ version: 1.0.0environment:sdk: ">=3.10.0 <4.0.0"-# Add regular dependencies here.dependencies:# these are pinned on purpose because the bundle_tool_runner doesn't have# pubspec.lock. See run_build_tool.shdiff --git a/mobile/packages/rust/cargokit/gradle/plugin.gradle b/mobile/packages/rust/cargokit/gradle/plugin.gradleindex 1be3ad6f22..c0748c9272 100644--- a/mobile/packages/rust/cargokit/gradle/plugin.gradle+++ b/mobile/packages/rust/cargokit/gradle/plugin.gradle@@ -120,7 +120,6 @@ class CargoKitPlugin implements Plugin<Project> {def cargoBuildDir = "${project.buildDir}/build"- // Determine if the project is an application or librarydef isApplication = plugin.project.plugins.hasPlugin('com.android.application')def variants = isApplication ? plugin.project.android.applicationVariants : plugin.project.android.libraryVariantsdiff --git a/mobile/packages/rust/cargokit/run_build_tool.sh b/mobile/packages/rust/cargokit/run_build_tool.shindex 24b0ed89da..749e8033fa 100755--- a/mobile/packages/rust/cargokit/run_build_tool.sh+++ b/mobile/packages/rust/cargokit/run_build_tool.sh@@ -42,7 +42,6 @@ void main(List<String> args) {}EOF-# Create alias for `shasum` if it does not exist and `sha1sum` existsif ! [ -x "$(command -v shasum)" ] && [ -x "$(command -v sha1sum)" ]; thenshopt -s expand_aliasesalias shasum="sha1sum"@@ -70,7 +69,6 @@ if [ -f "$PACKAGE_HASH_FILE" ]; thenfifi-# Run pub get if needed.if [ ! -f "$PACKAGE_HASH_FILE" ]; then"$DART" pub get --no-precompile"$DART" compile kernel bin/build_tool_runner.dartdiff --git a/mobile/packages/ui/lib/components/action_sheet_widget.dart b/mobile/packages/ui/lib/components/action_sheet_widget.dartindex 096750052c..4a4b938335 100644--- a/mobile/packages/ui/lib/components/action_sheet_widget.dart+++ b/mobile/packages/ui/lib/components/action_sheet_widget.dart@@ -209,9 +209,7 @@ class ActionButtons extends StatelessWidget {final actionButtonsWithSeparators = actionButtons;return Column(children:- //Separator height is 8pts in figma. -2pts here as the action- //buttons are 2pts extra in height in code compared to figma because- //of the border(1pt top + 1pt bottom) of action buttons.+ // Two 1-point button borders complete the 8-point visual gap.addSeparators(actionButtonsWithSeparators, const SizedBox(height: 6)),);}diff --git a/mobile/packages/ui/lib/components/buttons/button_widget.dart b/mobile/packages/ui/lib/components/buttons/button_widget.dartindex 18e1240361..c8ff3b516a 100644--- a/mobile/packages/ui/lib/components/buttons/button_widget.dart+++ b/mobile/packages/ui/lib/components/buttons/button_widget.dart@@ -70,7 +70,6 @@ class ButtonWidget extends StatelessWidget {? lightTextTheme: getEnteTextTheme(context, inverse: true);final buttonStyle = CustomButtonStyle(- //Dummy default values since we need to keep these properties non-nullabledefaultButtonColor: Colors.transparent,defaultBorderColor: Colors.transparent,defaultIconColor: Colors.transparent,@@ -428,11 +427,7 @@ class _ButtonChildWidgetState extends State<ButtonChildWidget> {setState(() {});}- // when the time taken by widget.onTap is approximately equal to the debounce- // time, the callback is getting executed when/after the if condition- // below is executing/executed which results in execution state stuck at- // idle state. This Future is for delaying the execution of the if- // condition so that the calback in the debouncer finishes execution before.+ // Let the debounced callback finish before checking its execution state.await Future.delayed(const Duration(milliseconds: 5));}if (!mounted) {@@ -510,8 +505,7 @@ class _ButtonChildWidgetState extends State<ButtonChildWidget> {if (Navigator.of(context).canPop()) {Navigator.of(context).pop(ButtonResult(widget.buttonAction, exception));} else if (exception != null) {- //This is to show the execution was unsuccessful if the dialog is manually- //closed before the execution completes.+ // Surface failures even if the dialog was dismissed mid-operation.showGenericErrorDialog(context: context, error: exception);}}diff --git a/mobile/packages/ui/lib/components/components_constants.dart b/mobile/packages/ui/lib/components/components_constants.dartindex 2f8cbf52b1..5960fa4818 100644--- a/mobile/packages/ui/lib/components/components_constants.dart+++ b/mobile/packages/ui/lib/components/components_constants.dart@@ -1,4 +1,4 @@const double mobileSmallThreshold = 336;-//Screen width of iPhone 14 pro max in points is taken as maximum+// Cap layouts at the 430-point width of an iPhone 14 Pro Max.const double restrictedMaxWidth = 430;diff --git a/mobile/packages/ui/lib/components/dialog_widget.dart b/mobile/packages/ui/lib/components/dialog_widget.dartindex 716a9ba77e..e38baf9911 100644--- a/mobile/packages/ui/lib/components/dialog_widget.dart+++ b/mobile/packages/ui/lib/components/dialog_widget.dart@@ -140,11 +140,7 @@ class Actions extends StatelessWidget {children: addSeparators(buttons,const SizedBox(- // In figma this white space is of height 8pts. But the Button- // component has 1pts of invisible border by default in code. So two- // 1pts borders will visually make the whitespace 8pts.- // Height of button component in figma = 48, in code = 50 (2pts for- // top + bottom border)+ // Two 1-point button borders complete the 8-point visual gap.height: 6,),),@@ -194,7 +190,7 @@ class TextInputDialog extends StatefulWidget {}class _TextInputDialogState extends State<TextInputDialog> {- //the value of this ValueNotifier has no significance+ // Only changes matter; the boolean value has no meaning.final _submitNotifier = ValueNotifier(false);@overridediff --git a/mobile/packages/ui/lib/components/progress_dialog.dart b/mobile/packages/ui/lib/components/progress_dialog.dartindex 37e72c9e02..92aee3eb55 100644--- a/mobile/packages/ui/lib/components/progress_dialog.dart+++ b/mobile/packages/ui/lib/components/progress_dialog.dart@@ -170,8 +170,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');_isShowing = true;diff --git a/mobile/packages/ui/lib/components/text_input_widget.dart b/mobile/packages/ui/lib/components/text_input_widget.dartindex c85532bdb6..4e6a34c5a5 100644--- a/mobile/packages/ui/lib/components/text_input_widget.dart+++ b/mobile/packages/ui/lib/components/text_input_widget.dart@@ -268,11 +268,7 @@ class _TextInputWidgetState extends State<TextInputWidget> {setState(() {});}- // when the time taken by widget.onSubmit is approximately equal to the debounce- // time, the callback is getting executed when/after the if condition- // below is executing/executed which results in execution state stuck at- // idle state. This Future is for delaying the execution of the if- // condition so that the calback in the debouncer finishes execution before.+ // Let the debounced callback finish before checking its execution state.await Future.delayed(const Duration(milliseconds: 5));if (!mounted) {return;diff --git a/mobile/packages/ui/lib/utils/dialog_util.dart b/mobile/packages/ui/lib/utils/dialog_util.dartindex a920207638..e20b922bae 100644--- a/mobile/packages/ui/lib/utils/dialog_util.dart+++ b/mobile/packages/ui/lib/utils/dialog_util.dart@@ -331,7 +331,7 @@ ProgressDialog createProgressDialog(return dialog;}-//Can return ButtonResult? from ButtonWidget or Exception? from TextInputDialog+// Returns null after submit, ButtonResult on cancel, and Exception on failure.Future<dynamic> showTextInputDialog(BuildContext context, {required String title,