|
|
@ -203,15 +203,15 @@ class Status extends ImmutablePureComponent { |
|
|
|
|
|
|
|
|
|
|
|
handleHotkeyOpenMedia = e => { |
|
|
|
handleHotkeyOpenMedia = e => { |
|
|
|
const { onOpenMedia, onOpenVideo } = this.props; |
|
|
|
const { onOpenMedia, onOpenVideo } = this.props; |
|
|
|
const statusId = this._properStatus().get('id'); |
|
|
|
const status = this._properStatus(); |
|
|
|
|
|
|
|
|
|
|
|
e.preventDefault(); |
|
|
|
e.preventDefault(); |
|
|
|
|
|
|
|
|
|
|
|
if (status.get('media_attachments').size > 0) { |
|
|
|
if (status.get('media_attachments').size > 0) { |
|
|
|
if (status.getIn(['media_attachments', 0, 'type']) === 'video') { |
|
|
|
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 { |
|
|
|
} else { |
|
|
|
onOpenMedia(statusId, status.get('media_attachments'), 0); |
|
|
|
onOpenMedia(status.get('id'), status.get('media_attachments'), 0); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|