mirror of
https://github.com/immich-app/immich.git
synced 2025-12-17 17:23:20 +03:00
chore: migration continue button (#20000)
* feat: add toggle to switch between Isar and Sqlite * reset sqlite on beta * start sync on app open in new timeline * fix lint * migrate hashes when new timeline is selected * migrate hashes immediately after beta is enabled * show loading indicator in change timeline page * some stylings * fix some styling issue * release resources on isolate close * replace route and styling * handle migration back to old timeline * check if a provider is mounted before calling dispose on it * styling * styling and button --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
@@ -57,14 +57,6 @@ class _ChangeExperiencePageState extends ConsumerState<ChangeExperiencePage> {
|
||||
await ref.read(backgroundSyncProvider).cancel();
|
||||
}
|
||||
|
||||
Future.delayed(const Duration(seconds: 3), () {
|
||||
context.replaceRoute(
|
||||
widget.switchingToBeta
|
||||
? const TabShellRoute()
|
||||
: const TabControllerRoute(),
|
||||
);
|
||||
});
|
||||
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
HapticFeedback.heavyImpact();
|
||||
@@ -104,7 +96,7 @@ class _ChangeExperiencePageState extends ConsumerState<ChangeExperiencePage> {
|
||||
duration: Durations.long4,
|
||||
child: hasMigrated
|
||||
? Text(
|
||||
"Migration success. Navigating to the new timeline...",
|
||||
"Migration success!",
|
||||
style: context.textTheme.titleMedium,
|
||||
textAlign: TextAlign.center,
|
||||
)
|
||||
@@ -115,6 +107,20 @@ class _ChangeExperiencePageState extends ConsumerState<ChangeExperiencePage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
if (hasMigrated)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 16.0),
|
||||
child: ElevatedButton(
|
||||
onPressed: () {
|
||||
context.replaceRoute(
|
||||
widget.switchingToBeta
|
||||
? const TabShellRoute()
|
||||
: const TabControllerRoute(),
|
||||
);
|
||||
},
|
||||
child: const Text("Continue"),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user