fix sync state provider type import and clean provider wiring
This commit is contained in:
parent
cf07bc6554
commit
28a115feea
|
|
@ -1,6 +1,5 @@
|
|||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import '../../database/database.dart';
|
||||
import '../../features/records/records_service.dart';
|
||||
import '../auth/auth_providers.dart';
|
||||
import '../auth/auth_state.dart';
|
||||
import '../cloud/firebase_account_sync_service.dart';
|
||||
|
|
@ -11,6 +10,7 @@ import 'github_sync_provider.dart';
|
|||
import 'r2_upload_service.dart';
|
||||
import 'sync_bundle_worker.dart';
|
||||
import 'sync_manager.dart';
|
||||
import 'sync_models.dart';
|
||||
import 'sync_outbox.dart';
|
||||
|
||||
final r2UploadServiceProvider = Provider<R2UploadService>((ref) => R2UploadService());
|
||||
|
|
@ -44,10 +44,9 @@ final syncManagerProvider = ChangeNotifierProvider<SyncManager>((ref) {
|
|||
ref.listen<AuthState>(authNotifierProvider, (previous, next) {
|
||||
if (next.isAuthenticated && previous?.isAuthenticated != true) {
|
||||
manager.retryAuthRequired();
|
||||
accountSync.syncAccount().catchError((error) {
|
||||
accountSync.syncAccount().then((_) {}, onError: (_) {
|
||||
// Profile/garage synchronization is downstream of riding and must
|
||||
// never interrupt telemetry or ride persistence.
|
||||
return Future<void>.value();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue