Refactor preferences

This commit is contained in:
problematicconsumer
2024-03-02 22:53:14 +03:30
parent 201ea5e88d
commit 2a994dc348
32 changed files with 1104 additions and 1389 deletions

View File

@@ -15,8 +15,7 @@ ConnectionRepository connectionRepository(
) {
return ConnectionRepositoryImpl(
directories: ref.watch(appDirectoriesProvider).requireValue,
singBoxConfigOptionRepository:
ref.watch(singBoxConfigOptionRepositoryProvider),
configOptionRepository: ref.watch(configOptionRepositoryProvider),
singbox: ref.watch(singboxServiceProvider),
platformSource: ConnectionPlatformSourceImpl(),
profilePathResolver: ref.watch(profilePathResolverProvider),

View File

@@ -38,7 +38,7 @@ class ConnectionRepositoryImpl
required this.directories,
required this.singbox,
required this.platformSource,
required this.singBoxConfigOptionRepository,
required this.configOptionRepository,
required this.profilePathResolver,
required this.geoAssetPathResolver,
});
@@ -46,7 +46,7 @@ class ConnectionRepositoryImpl
final Directories directories;
final SingboxService singbox;
final ConnectionPlatformSource platformSource;
final SingBoxConfigOptionRepository singBoxConfigOptionRepository;
final ConfigOptionRepository configOptionRepository;
final ProfilePathResolver profilePathResolver;
final GeoAssetPathResolver geoAssetPathResolver;
@@ -83,7 +83,7 @@ class ConnectionRepositoryImpl
return TaskEither<ConnectionFailure, SingboxConfigOption>.Do(
($) async {
final options = await $(
singBoxConfigOptionRepository
configOptionRepository
.getFullSingboxConfigOption()
.mapLeft((l) => const InvalidConfigOption()),
);