Update codebase
This commit is contained in:
@@ -51,6 +51,7 @@ import 'notifications/push_service.dart';
|
||||
import 'realtime/realtime_service.dart';
|
||||
|
||||
import 'session/session_cubit.dart';
|
||||
import 'session/session_source.dart';
|
||||
|
||||
import 'storage/token_store.dart';
|
||||
|
||||
@@ -84,10 +85,12 @@ Future<void> setupInjector() async {
|
||||
),
|
||||
);
|
||||
|
||||
sl.registerSingleton<AuthRepository>(AuthRepository(sl(), sl()));
|
||||
final authRepo = AuthRepository(sl(), sl());
|
||||
sl.registerSingleton<AuthRepository>(authRepo);
|
||||
sl.registerSingleton<SessionSource>(authRepo);
|
||||
sl.registerSingleton<ProfileRepository>(ProfileRepository(sl()));
|
||||
sl.registerSingleton<SessionCubit>(
|
||||
SessionCubit(sl(), onAuthenticated: () => sl<PushService>().register()),
|
||||
SessionCubit(authRepo, onAuthenticated: () => sl<PushService>().register()),
|
||||
);
|
||||
|
||||
// تدفّق الدخول قصير العمر: نسخة جديدة لكل دخول، لا نسخة واحدة أبدية.
|
||||
|
||||
Reference in New Issue
Block a user