mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
chore: refactor show view in timeline button (#22894)
* chore: refactor show view in timeline button This refactor includes changes to notify asset viewer about where an asset was shown from. * chore: realized I could just pull from the timelineProvider instead of storing it in the asset viewer state * chore: rename enum to TimelineOrigin and update members * fix: update isOwner condition --------- Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
parent
d778286777
commit
b484a52252
5 changed files with 60 additions and 17 deletions
|
|
@ -8,6 +8,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|||
import 'package:immich_mobile/constants/enums.dart';
|
||||
import 'package:immich_mobile/domain/models/person.model.dart';
|
||||
import 'package:immich_mobile/domain/models/timeline.model.dart';
|
||||
import 'package:immich_mobile/domain/services/timeline.service.dart';
|
||||
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||
import 'package:immich_mobile/extensions/translate_extensions.dart';
|
||||
|
|
@ -624,7 +625,7 @@ class _SearchResultGrid extends ConsumerWidget {
|
|||
child: ProviderScope(
|
||||
overrides: [
|
||||
timelineServiceProvider.overrideWith((ref) {
|
||||
final timelineService = ref.watch(timelineFactoryProvider).fromAssets(assets);
|
||||
final timelineService = ref.watch(timelineFactoryProvider).fromAssets(assets, TimelineOrigin.search);
|
||||
ref.onDispose(timelineService.dispose);
|
||||
return timelineService;
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue