forked from AkkomaGang/akkoma
2 lines
3.2 KiB
JavaScript
2 lines
3.2 KiB
JavaScript
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{861:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return U}));var o,i,c,a=n(0),l=n(2),d=(n(9),n(6),n(8)),r=n(1),s=n(3),u=n.n(s),m=n(15),p=n(7),h=n(5),b=n.n(h),f=n(1063),y=n(762),j=n(759),O=n(36),M=n(253),g=n(1172),v=n(74),I=Object(m.connect)((function(e,t){var n=t.columnId,o=e.getIn(["settings","columns"]),i=o.findIndex((function(e){return e.get("uuid")===n}));return{settings:n&&i>=0?o.get(i).get("params"):e.getIn(["settings","community"])}}),(function(e,t){var n=t.columnId;return{onChange:function(t,o){e(n?Object(M.f)(n,t,o):Object(v.c)(["community"].concat(t),o))}}}))(g.a),C=n(766);var w=Object(p.f)({title:{id:"column.community",defaultMessage:"Local timeline"}}),U=Object(m.connect)((function(e,t){var n=t.columnId,o=n,i=e.getIn(["settings","columns"]),c=i.findIndex((function(e){return e.get("uuid")===o})),a=n&&c>=0?i.get(c).getIn(["params","other","onlyMedia"]):e.getIn(["settings","community","other","onlyMedia"]),l=e.getIn(["timelines","community"+(a?":media":"")]);return{hasUnread:!!l&&l.get("unread")>0,onlyMedia:a}}))(o=Object(p.g)((c=i=function(e){Object(d.a)(n,e);var t;t=n;function n(){for(var t,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return t=e.call.apply(e,[this].concat(o))||this,Object(r.a)(Object(l.a)(t),"handlePin",(function(){var e=t.props,n=e.columnId,o=e.dispatch,i=e.onlyMedia;o(n?Object(M.h)(n):Object(M.e)("COMMUNITY",{other:{onlyMedia:i}}))})),Object(r.a)(Object(l.a)(t),"handleMove",(function(e){var n=t.props,o=n.columnId;(0,n.dispatch)(Object(M.g)(o,e))})),Object(r.a)(Object(l.a)(t),"handleHeaderClick",(function(){t.column.scrollTop()})),Object(r.a)(Object(l.a)(t),"setRef",(function(e){t.column=e})),Object(r.a)(Object(l.a)(t),"handleLoadMore",(function(e){var n=t.props,o=n.dispatch,i=n.onlyMedia;o(Object(O.r)({maxId:e,onlyMedia:i}))})),t}var o=n.prototype;return o.componentDidMount=function(){var e=this.props,t=e.dispatch,n=e.onlyMedia;t(Object(O.r)({onlyMedia:n})),this.disconnect=t(Object(C.a)({onlyMedia:n}))},o.componentDidUpdate=function(e){if(e.onlyMedia!==this.props.onlyMedia){var t=this.props,n=t.dispatch,o=t.onlyMedia;this.disconnect(),n(Object(O.r)({onlyMedia:o})),this.disconnect=n(Object(C.a)({onlyMedia:o}))}},o.componentWillUnmount=function(){this.disconnect&&(this.disconnect(),this.disconnect=null)},o.render=function(){var e=this.props,t=e.intl,n=e.shouldUpdateScroll,o=e.hasUnread,i=e.columnId,c=e.multiColumn,l=e.onlyMedia,d=!!i;return u.a.createElement(y.a,{bindToDocument:!c,ref:this.setRef,label:t.formatMessage(w.title)},Object(a.a)(j.a,{icon:"users",active:o,title:t.formatMessage(w.title),onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:d,multiColumn:c},void 0,Object(a.a)(I,{columnId:i})),Object(a.a)(f.a,{trackScroll:!d,scrollKey:"community_timeline-"+i,timelineId:"community"+(l?":media":""),onLoadMore:this.handleLoadMore,emptyMessage:Object(a.a)(p.b,{id:"empty_column.community",defaultMessage:"The local timeline is empty. Write something publicly to get the ball rolling!"}),shouldUpdateScroll:n,bindToDocument:!c}))},n}(u.a.PureComponent),Object(r.a)(i,"contextTypes",{router:b.a.object}),Object(r.a)(i,"defaultProps",{onlyMedia:!1}),o=c))||o)||o}}]);
|
||
|
//# sourceMappingURL=community_timeline.js.map
|