mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor(mobile): move timeline methods to timeline repo (#16526)
* refactor: move timeline calls to timeline repo * refactor: review changes --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
3d6a6f77a8
commit
4db8f0c666
12 changed files with 64 additions and 61 deletions
|
|
@ -21,12 +21,23 @@ class TimelineService {
|
|||
final ITimelineRepository _timelineRepository;
|
||||
final IUserRepository _userRepository;
|
||||
final AppSettingsService _appSettingsService;
|
||||
TimelineService(
|
||||
|
||||
const TimelineService(
|
||||
this._timelineRepository,
|
||||
this._userRepository,
|
||||
this._appSettingsService,
|
||||
);
|
||||
|
||||
Future<List<int>> getTimelineUserIds() async {
|
||||
final me = await _userRepository.me();
|
||||
return _timelineRepository.getTimelineUserIds(me.isarId);
|
||||
}
|
||||
|
||||
Stream<List<int>> watchTimelineUserIds() async* {
|
||||
final me = await _userRepository.me();
|
||||
yield* _timelineRepository.watchTimelineUsers(me.isarId);
|
||||
}
|
||||
|
||||
Stream<RenderList> watchHomeTimeline(int userId) {
|
||||
return _timelineRepository.watchHomeTimeline(userId, _getGroupByOption());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue