about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/account_gallery/index.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-05-03 16:16:30 +0200
committerGitHub <noreply@github.com>2019-05-03 16:16:30 +0200
commiteb63217210b0ab85ff1fcca9506d5e7931382a56 (patch)
tree7d89373f2f0aa4c5ced184a265ae188d5efe9ce3 /app/javascript/mastodon/features/account_gallery/index.js
parentecbea2e3c6e49387b1eaefbbebd2013867414ca2 (diff)
Add button to view context to media modal (#10676)
* Add "view context" button to media modal when opened from gallery

* Add "view context" button to video modal

Allow closing the video modal by navigating back in the browser,
just like the media modal
Diffstat (limited to 'app/javascript/mastodon/features/account_gallery/index.js')
-rw-r--r--app/javascript/mastodon/features/account_gallery/index.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/mastodon/features/account_gallery/index.js b/app/javascript/mastodon/features/account_gallery/index.js
index 8766473fe..5d6a53e18 100644
--- a/app/javascript/mastodon/features/account_gallery/index.js
+++ b/app/javascript/mastodon/features/account_gallery/index.js
@@ -100,12 +100,12 @@ class AccountGallery extends ImmutablePureComponent {
 
   handleOpenMedia = attachment => {
     if (attachment.get('type') === 'video') {
-      this.props.dispatch(openModal('VIDEO', { media: attachment }));
+      this.props.dispatch(openModal('VIDEO', { media: attachment, status: attachment.get('status') }));
     } else {
       const media = attachment.getIn(['status', 'media_attachments']);
       const index = media.findIndex(x => x.get('id') === attachment.get('id'));
 
-      this.props.dispatch(openModal('MEDIA', { media, index }));
+      this.props.dispatch(openModal('MEDIA', { media, index, status: attachment.get('status') }));
     }
   }