Add background sync runner and rejected-sync UX
This commit is contained in:
+4
-2
@@ -4,6 +4,7 @@ import 'package:relationship_saver/core/config/app_theme.dart';
|
||||
import 'package:relationship_saver/features/auth/session_controller.dart';
|
||||
import 'package:relationship_saver/features/auth/sign_in_view.dart';
|
||||
import 'package:relationship_saver/features/home/app_shell.dart';
|
||||
import 'package:relationship_saver/features/sync/sync_background_runner.dart';
|
||||
import 'package:relationship_saver/integrations/backend/models/backend_models.dart';
|
||||
|
||||
void main() {
|
||||
@@ -25,8 +26,9 @@ class RelationshipSaverApp extends ConsumerWidget {
|
||||
theme: AppTheme.light(),
|
||||
home: Scaffold(
|
||||
body: sessionState.when(
|
||||
data: (session) =>
|
||||
session == null ? const SignInView() : const AppShell(),
|
||||
data: (session) => session == null
|
||||
? const SignInView()
|
||||
: const SyncBackgroundRunner(child: AppShell()),
|
||||
loading: () => const Center(child: CircularProgressIndicator()),
|
||||
error: (Object error, StackTrace stackTrace) => const SignInView(),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user