fix(mobile): show view in timeline for photos opened from a deep link (#33001)

This commit is contained in:
Santo Shakil authored and Codex committed 2026-11-05 20:34:15 +03:00
1 parent faaf0e410b
commit 17ad3a2e8a
2 files changed
+19 -1

No files matched your search

@@ -152,7 +152,6 @@ enum ActionButtonType {
ActionButtonType.openInfo => true,
ActionButtonType.viewInTimeline =>
context.timelineOrigin != TimelineOrigin.main &&
context.timelineOrigin != TimelineOrigin.deepLink &&
context.timelineOrigin != TimelineOrigin.trash &&
context.timelineOrigin != TimelineOrigin.lockedFolder &&
context.timelineOrigin != TimelineOrigin.archive &&
@@ -645,6 +645,25 @@ void main() {
});
});
group('viewInTimeline button', () {
test('should show when owner and opened from a deep link', () {
final remoteAsset = createRemoteAsset();
final context = ActionButtonContext(
asset: remoteAsset,
isOwner: true,
isArchived: false,
isInLockedView: false,
currentAlbum: null,
advancedTroubleshooting: false,
isStacked: false,
source: ActionSource.viewer,
timelineOrigin: TimelineOrigin.deepLink,
);
expect(ActionButtonType.viewInTimeline.shouldShow(context), isTrue);
});
});
group('setAlbumCover button', () {
test('should show when owner, not locked, has album, and selectedCount is 1', () {
final album = createRemoteAlbum();