Skip to content

armgit / ente

Public Imported from GitHub
0

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

Fix backup folder selection handoff

Prateek Sunal2bb47d045e77
diff --git a/mobile/apps/photos/lib/ui/home/loading_photos_widget.dart b/mobile/apps/photos/lib/ui/home/loading_photos_widget.dart
index 78b6b6250a..5c920d41d7 100644
--- a/mobile/apps/photos/lib/ui/home/loading_photos_widget.dart
+++ b/mobile/apps/photos/lib/ui/home/loading_photos_widget.dart
@@ -49,11 +49,10 @@ class _LoadingPhotosWidgetState extends State<LoadingPhotosWidget> {
if (permissionService.hasGrantedLimitedPermissions()) {
// Do nothing, let HomeWidget refresh
} else {
- // ignore: unawaited_futures
- routeToPage(
+ replacePage(
context,
const BackupFolderSelectionPage(
- isOnboarding: true,
+ isOnboarding: false,
isFirstBackup: true,
),
);
diff --git a/mobile/apps/photos/lib/ui/home/start_backup_hook_widget.dart b/mobile/apps/photos/lib/ui/home/start_backup_hook_widget.dart
index 7eb83d1cd3..85f241a7b4 100644
--- a/mobile/apps/photos/lib/ui/home/start_backup_hook_widget.dart
+++ b/mobile/apps/photos/lib/ui/home/start_backup_hook_widget.dart
@@ -11,46 +11,59 @@ class StartBackupHookWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
- return Column(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- headerWidget,
- Padding(
- padding: const EdgeInsets.only(top: 64),
- child: Image.asset(
- "assets/onboarding_safe.png",
- height: 206,
- ),
- ),
- Text(
- AppLocalizations.of(context).noPhotosAreBeingBackedUpRightNow,
- style: Theme.of(context)
- .textTheme
- .bodySmall!
- .copyWith(fontFamily: 'Inter-Medium', fontSize: 16),
- ),
- Center(
- child: Material(
- type: MaterialType.transparency,
- child: Container(
- width: double.infinity,
- height: 64,
- padding: const EdgeInsets.fromLTRB(20, 0, 20, 0),
- child: GradientButton(
- onTap: () async {
- await handleBackupEntryFlow(
- context,
- onFirstImportComplete: () =>
- const BackupFolderSelectionPage(isFirstBackup: true),
- );
- },
- text: AppLocalizations.of(context).startBackup,
- ),
+ return LayoutBuilder(
+ builder: (context, constraints) {
+ return SingleChildScrollView(
+ child: ConstrainedBox(
+ constraints: BoxConstraints(
+ minHeight: constraints.maxHeight,
+ ),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ headerWidget,
+ Padding(
+ padding: const EdgeInsets.only(top: 64),
+ child: Image.asset(
+ "assets/onboarding_safe.png",
+ height: 206,
+ ),
+ ),
+ Text(
+ AppLocalizations.of(context).noPhotosAreBeingBackedUpRightNow,
+ style: Theme.of(context)
+ .textTheme
+ .bodySmall!
+ .copyWith(fontFamily: 'Inter-Medium', fontSize: 16),
+ ),
+ Center(
+ child: Material(
+ type: MaterialType.transparency,
+ child: Container(
+ width: double.infinity,
+ height: 64,
+ padding: const EdgeInsets.fromLTRB(20, 0, 20, 0),
+ child: GradientButton(
+ onTap: () async {
+ await handleBackupEntryFlow(
+ context,
+ onFirstImportComplete: () =>
+ const BackupFolderSelectionPage(
+ isFirstBackup: true,
+ ),
+ );
+ },
+ text: AppLocalizations.of(context).startBackup,
+ ),
+ ),
+ ),
+ ),
+ const Padding(padding: EdgeInsets.all(50)),
+ ],
),
),
- ),
- const Padding(padding: EdgeInsets.all(50)),
- ],
+ );
+ },
);
}
}