{"version":3,"sources":["webpack:///./app/javascript/mastodon/features/home_timeline/components/column_settings.js","webpack:///./app/javascript/mastodon/features/home_timeline/containers/column_settings_container.js","webpack:///./app/javascript/mastodon/features/home_timeline/index.js"],"names":["column_settings_ColumnSettings","Object","index_es","render","_props","this","props","settings","onChange","jsx_default","className","id","defaultMessage","setting_toggle","prefix","settingPath","label","react_default","a","PureComponent","column_settings_container","es","state","getIn","dispatch","key","checked","actions_settings","concat","onSave","messages","title","home_timeline_HomeTimeline","hasUnread","isPartial","handlePin","_this$props","_this","columnId","columns","handleMove","dir","_this$props2","handleHeaderClick","column","scrollTop","setRef","c","handleLoadMore","maxId","timelines","componentDidMount","_checkIfReloadNeeded","componentDidUpdate","prevProps","componentWillUnmount","_stopPolling","wasPartial","polling","setInterval","clearInterval","intl","shouldUpdateScroll","multiColumn","pinned","createElement","ref","formatMessage","column_header","icon","active","onPin","onMove","onClick","status_list_container","trackScroll","scrollKey","onLoadMore","timelineId","emptyMessage","values","public","Link","to"],"mappings":"2PAOqBA,EADpBC,OAAAC,EAAA,EAAAD,6GASCE,kBAAU,IAAAC,EACuBC,KAAKC,MAA5BC,EADAH,EACAG,SAAUC,EADVJ,EACUI,SAElB,OAAAC,IAAA,gBAAAA,IAAA,QAAAC,UAEoB,iCAFpB,EAAAD,IAEgDP,EAAA,GAFhDS,GAEoE,6BAFpEC,eAEgH,WAFhHH,IAAA,OAAAC,UAImB,6BAJnB,EAAAD,IAKOI,EAAA,GALPC,OAK4B,gBAL5BP,SAKsDA,EALtDQ,aAK8E,QAAS,UALvFP,SAK4GA,EAL5GQ,MAAAP,IAK8HP,EAAA,GAL9HS,GAKkJ,oCALlJC,eAKqM,mBALrMH,IAAA,OAAAC,UAQmB,6BARnB,EAAAD,IASOI,EAAA,GATPC,OAS4B,gBAT5BP,SASsDA,EATtDQ,aAS8E,QAAS,SATvFP,SAS2GA,EAT3GQ,MAAAP,IAS6HP,EAAA,GAT7HS,GASiJ,oCATjJC,eASoM,yBApB5J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,8BAAsBK,EAAYvB,GAAW,IACnCV,EAAanB,KAAKC,MAAlBkB,SAEJiC,IAAevB,KAEPuB,GAAcvB,EACxB7B,KAAKqD,QAAUC,YAAY,WACzBnC,EAASvB,OAAAiD,EAAA,EAAAjD,KACR,KACMwD,IAAevB,GACxB7B,KAAKmD,6BAITA,wBACMnD,KAAKqD,UACPE,cAAcvD,KAAKqD,SACnBrD,KAAKqD,QAAU,mBAInBvD,kBAAU,IAAAC,EAC+DC,KAAKC,MAApEuD,EADAzD,EACAyD,KAAMC,EADN1D,EACM0D,mBAAoB7B,EAD1B7B,EAC0B6B,UAAWK,EADrClC,EACqCkC,SAAUyB,EAD/C3D,EAC+C2D,YACjDC,IAAW1B,EAEjB,OACErB,EAAAC,EAAA+C,cAACrB,EAAA,GAAOsB,IAAK7D,KAAKyC,OAAQ9B,MAAO6C,EAAKM,cAAcrC,EAASC,QAA7DtB,IACG2D,EAAA,GADHC,KAES,OAFTC,OAGYrC,EAHZF,MAIW8B,EAAKM,cAAcrC,EAASC,OAJvCwC,MAKWlE,KAAK8B,UALhBqC,OAMYnE,KAAKmC,WANjBiC,QAOapE,KAAKsC,kBAPlBqB,OAQYA,EARZD,YASiBA,QATjB,EAAAtD,IAWKW,OAXLX,IAcGiE,EAAA,GAdHC,aAekBX,EAflBY,UAAA,iBAgBgCtC,EAhBhCuC,WAiBgBxE,KAAK2C,eAjBrB8B,WAkBe,OAlBfC,aAAAtE,IAmBmBP,EAAA,GAnBnBS,GAmBuC,oBAnBvCC,eAmB0E,iGAnB1EoE,QAmBqLC,OAAAxE,IAASyE,EAAA,GAATC,GAAiB,0BAAjB,EAAA1E,IAAsCP,EAAA,GAAtCS,GAA0D,oCAA1DC,eAA6G,4BAnBlSkD,mBAoBwBA,SAjGY7C,EAAAC,EAAMC","file":"features/home_timeline.js","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { injectIntl, FormattedMessage } from 'react-intl';\nimport SettingToggle from '../../notifications/components/setting_toggle';\n\n@injectIntl\nexport default class ColumnSettings extends React.PureComponent {\n\n static propTypes = {\n settings: ImmutablePropTypes.map.isRequired,\n onChange: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n };\n\n render () {\n const { settings, onChange } = this.props;\n\n return (\n
\n \n\n
\n } />\n
\n\n
\n } />\n
\n
\n );\n }\n\n}\n","import { connect } from 'react-redux';\nimport ColumnSettings from '../components/column_settings';\nimport { changeSetting, saveSettings } from '../../../actions/settings';\n\nconst mapStateToProps = state => ({\n settings: state.getIn(['settings', 'home']),\n});\n\nconst mapDispatchToProps = dispatch => ({\n\n onChange (key, checked) {\n dispatch(changeSetting(['home', ...key], checked));\n },\n\n onSave () {\n dispatch(saveSettings());\n },\n\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ColumnSettings);\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { expandHomeTimeline } from '../../actions/timelines';\nimport PropTypes from 'prop-types';\nimport StatusListContainer from '../ui/containers/status_list_container';\nimport Column from '../../components/column';\nimport ColumnHeader from '../../components/column_header';\nimport { addColumn, removeColumn, moveColumn } from '../../actions/columns';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport ColumnSettingsContainer from './containers/column_settings_container';\nimport { Link } from 'react-router-dom';\n\nconst messages = defineMessages({\n title: { id: 'column.home', defaultMessage: 'Home' },\n});\n\nconst mapStateToProps = state => ({\n hasUnread: state.getIn(['timelines', 'home', 'unread']) > 0,\n isPartial: state.getIn(['timelines', 'home', 'items', 0], null) === null,\n});\n\n@connect(mapStateToProps)\n@injectIntl\nexport default class HomeTimeline extends React.PureComponent {\n\n static propTypes = {\n dispatch: PropTypes.func.isRequired,\n shouldUpdateScroll: PropTypes.func,\n intl: PropTypes.object.isRequired,\n hasUnread: PropTypes.bool,\n isPartial: PropTypes.bool,\n columnId: PropTypes.string,\n multiColumn: PropTypes.bool,\n };\n\n handlePin = () => {\n const { columnId, dispatch } = this.props;\n\n if (columnId) {\n dispatch(removeColumn(columnId));\n } else {\n dispatch(addColumn('HOME', {}));\n }\n }\n\n handleMove = (dir) => {\n const { columnId, dispatch } = this.props;\n dispatch(moveColumn(columnId, dir));\n }\n\n handleHeaderClick = () => {\n this.column.scrollTop();\n }\n\n setRef = c => {\n this.column = c;\n }\n\n handleLoadMore = maxId => {\n this.props.dispatch(expandHomeTimeline({ maxId }));\n }\n\n componentDidMount () {\n this._checkIfReloadNeeded(false, this.props.isPartial);\n }\n\n componentDidUpdate (prevProps) {\n this._checkIfReloadNeeded(prevProps.isPartial, this.props.isPartial);\n }\n\n componentWillUnmount () {\n this._stopPolling();\n }\n\n _checkIfReloadNeeded (wasPartial, isPartial) {\n const { dispatch } = this.props;\n\n if (wasPartial === isPartial) {\n return;\n } else if (!wasPartial && isPartial) {\n this.polling = setInterval(() => {\n dispatch(expandHomeTimeline());\n }, 3000);\n } else if (wasPartial && !isPartial) {\n this._stopPolling();\n }\n }\n\n _stopPolling () {\n if (this.polling) {\n clearInterval(this.polling);\n this.polling = null;\n }\n }\n\n render () {\n const { intl, shouldUpdateScroll, hasUnread, columnId, multiColumn } = this.props;\n const pinned = !!columnId;\n\n return (\n \n \n \n \n\n }} />}\n shouldUpdateScroll={shouldUpdateScroll}\n />\n \n );\n }\n\n}\n"],"sourceRoot":""}