mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
refactor: remove riverpod generator (#27874)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
@@ -3,13 +3,11 @@ import 'package:immich_mobile/providers/infrastructure/asset.provider.dart';
|
||||
import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart';
|
||||
import 'package:immich_mobile/repositories/activity_api.repository.dart';
|
||||
import 'package:immich_mobile/services/activity.service.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
|
||||
part 'activity_service.provider.g.dart';
|
||||
|
||||
@riverpod
|
||||
ActivityService activityService(Ref ref) => ActivityService(
|
||||
ref.watch(activityApiRepositoryProvider),
|
||||
ref.watch(timelineFactoryProvider),
|
||||
ref.watch(assetServiceProvider),
|
||||
);
|
||||
final activityServiceProvider = Provider.autoDispose<ActivityService>((ref) {
|
||||
return ActivityService(
|
||||
ref.watch(activityApiRepositoryProvider),
|
||||
ref.watch(timelineFactoryProvider),
|
||||
ref.watch(assetServiceProvider),
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user