diff options
author | Jeong Arm <kjwonmail@gmail.com> | 2020-12-09 08:24:13 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-09 00:24:13 +0100 |
commit | 7aee364795a9b59c50a671477c64ce79c0685197 (patch) | |
tree | a1a1d3f2bfd94b783da33834bb63a75c737a3860 | |
parent | 765626a3a766ce212e73a1a51f6a048cc19ffc63 (diff) |
Fix open media hotkey (#15308)
* Fix open media hotkey * Update status.js Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
-rw-r--r-- | app/javascript/mastodon/components/status.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js index d9e7347f8..295e83f58 100644 --- a/app/javascript/mastodon/components/status.js +++ b/app/javascript/mastodon/components/status.js @@ -203,15 +203,15 @@ class Status extends ImmutablePureComponent { handleHotkeyOpenMedia = e => { const { onOpenMedia, onOpenVideo } = this.props; - const statusId = this._properStatus().get('id'); + const status = this._properStatus(); e.preventDefault(); if (status.get('media_attachments').size > 0) { if (status.getIn(['media_attachments', 0, 'type']) === 'video') { - onOpenVideo(statusId, status.getIn(['media_attachments', 0]), { startTime: 0 }); + onOpenVideo(status.get('id'), status.getIn(['media_attachments', 0]), { startTime: 0 }); } else { - onOpenMedia(statusId, status.get('media_attachments'), 0); + onOpenMedia(status.get('id'), status.get('media_attachments'), 0); } } } |