chore: refactor show view in timeline button

This refactor includes changes to notify asset viewer about where an asset was shown from.
This commit is contained in:
bwees 2025-10-12 23:54:44 -05:00
parent f2b553182a
commit 268867353b
No known key found for this signature in database
8 changed files with 77 additions and 22 deletions

View file

@ -61,8 +61,9 @@ class AssetViewer extends ConsumerStatefulWidget {
@override
ConsumerState createState() => _AssetViewerState();
static void setAsset(WidgetRef ref, BaseAsset asset) {
static void setAsset(WidgetRef ref, BaseAsset asset, TimelineType timelineType) {
ref.read(assetViewerProvider.notifier).reset();
ref.read(assetViewerProvider.notifier).setTimelineType(timelineType);
_setAsset(ref, asset);
}