(window.webpackJsonp=window.webpackJsonp||[]).push([[57],{1028:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return v}));var o,i=n(0),s=n(1),l=n.n(s),c=n(12),a=n(4),d=n(3),r=n.n(d),m=n(1329),u=n(961),h=n(958),p=n(24),b=n(271),y=n(1328);let g=Object(a.g)(o=class extends l.a.PureComponent{render(){const{settings:e,onChange:t}=this.props;return Object(i.a)("div",{},void 0,Object(i.a)("div",{className:"column-settings__row"},void 0,Object(i.a)(y.a,{settings:e,settingPath:["other","onlyMedia"],onChange:t,label:Object(i.a)(a.b,{id:"community.column_settings.media_only",defaultMessage:"Media only"})}),Object(i.a)(y.a,{settings:e,settingPath:["other","onlyRemote"],onChange:t,label:Object(i.a)(a.b,{id:"community.column_settings.remote_only",defaultMessage:"Remote only"})})))}})||o;var M=n(59);var j,O,f=Object(c.connect)(((e,t)=>{let{columnId:n}=t;const o=n,i=e.getIn(["settings","columns"]),s=i.findIndex((e=>e.get("uuid")===o));return{settings:o&&s>=0?i.get(s).get("params"):e.getIn(["settings","public"])}}),((e,t)=>{let{columnId:n}=t;return{onChange(t,o){e(n?Object(b.f)(n,t,o):Object(M.c)(["public",...t],o))}}}))(g),R=n(967);const I=Object(a.f)({title:{id:"column.public",defaultMessage:"Federated timeline"}});let v=Object(c.connect)(((e,t)=>{let{columnId:n}=t;const o=n,i=e.getIn(["settings","columns"]),s=i.findIndex((e=>e.get("uuid")===o)),l=n&&s>=0?i.get(s).getIn(["params","other","onlyMedia"]):e.getIn(["settings","public","other","onlyMedia"]),c=n&&s>=0?i.get(s).getIn(["params","other","onlyRemote"]):e.getIn(["settings","public","other","onlyRemote"]),a=e.getIn(["timelines","public"+(l?":media":"")]);return{hasUnread:!!a&&a.get("unread")>0,onlyMedia:l,onlyRemote:c}}))(j=Object(a.g)(((O=class extends l.a.PureComponent{constructor(){super(...arguments),this.handlePin=()=>{const{columnId:e,dispatch:t,onlyMedia:n,onlyRemote:o}=this.props;t(e?Object(b.h)(e):Object(b.e)(o?"REMOTE":"PUBLIC",{other:{onlyMedia:n,onlyRemote:o}}))},this.handleMove=e=>{const{columnId:t,dispatch:n}=this.props;n(Object(b.g)(t,e))},this.handleHeaderClick=()=>{this.column.scrollTop()},this.setRef=e=>{this.column=e},this.handleLoadMore=e=>{const{dispatch:t,onlyMedia:n,onlyRemote:o}=this.props;t(Object(p.w)({maxId:e,onlyMedia:n,onlyRemote:o}))}}componentDidMount(){const{dispatch:e,onlyMedia:t,onlyRemote:n}=this.props;e(Object(p.w)({onlyMedia:t,onlyRemote:n})),this.disconnect=e(Object(R.e)({onlyMedia:t,onlyRemote:n}))}componentDidUpdate(e){if(e.onlyMedia!==this.props.onlyMedia||e.onlyRemote!==this.props.onlyRemote){const{dispatch:e,onlyMedia:t,onlyRemote:n}=this.props;this.disconnect(),e(Object(p.w)({onlyMedia:t,onlyRemote:n})),this.disconnect=e(Object(R.e)({onlyMedia:t,onlyRemote:n}))}}componentWillUnmount(){this.disconnect&&(this.disconnect(),this.disconnect=null)}render(){const{intl:e,columnId:t,hasUnread:n,multiColumn:o,onlyMedia:s,onlyRemote:c}=this.props,d=!!t;return l.a.createElement(u.a,{bindToDocument:!o,ref:this.setRef,label:e.formatMessage(I.title)},Object(i.a)(h.a,{icon:"globe",active:n,title:e.formatMessage(I.title),onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:d,multiColumn:o},void 0,Object(i.a)(f,{columnId:t})),Object(i.a)(m.a,{timelineId:"public"+(c?":remote":"")+(s?":media":""),onLoadMore:this.handleLoadMore,trackScroll:!d,scrollKey:"public_timeline-"+t,emptyMessage:Object(i.a)(a.b,{id:"empty_column.public",defaultMessage:"There is nothing here! Write something publicly, or manually follow users from other servers to fill it up"}),bindToDocument:!o}))}}).contextTypes={router:r.a.object},O.defaultProps={onlyMedia:!1},j=O))||j)||j}}]);
//# sourceMappingURL=public_timeline-8464ae4630dfb4450c57.chunk.js.map