import Action , { ThunkAction } from './type' ; import KeymapTransition from '../keybinds/keymap_transition' ; export function openPicturePreview ( media_urls , index ? ) { return dispatch => { KeymapTransition . enterMediaPreview ( ) ; dispatch ( { type : 'OpenPicturePreview' , media_urls , index , } ) ; } ; } export function closeTweetMedia ( ) { return ( dispatch , getState ) => { KeymapTransition . escapeFromCurrentKeymaps ( getState ( ) ) ; dispatch ( { type : 'CloseTweetMedia' , } ) ; } ; } export function moveToNthPicturePreview ( index ) { return { type : 'MoveToNthPicturePreview' , index , } ; }