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:
Alex 2025-07-17 15:58:55 -05:00 committed by GitHub
parent 8491fe459d
commit 546f841b2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 40 additions and 18 deletions

View file

@ -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"),
),
),
],
),
),