pleroma/priv/static/packs/flavours/glitch/async/community_timeline.js
2020-01-22 16:00:23 +01:00

2 lines
3.2 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[53],{763:function(e,n,t){"use strict";t.r(n);var o,i,c,a=t(0),l=t(2),s=t(7),d=t(1),r=t(3),u=t.n(r),m=t(12),p=t(6),h=t(5),b=t.n(h),y=t(973),f=t(667),j=t(664),M=t(33),O=t(243),g=t(1061),I=t(71),v=Object(m.connect)(function(e,n){var t=n.columnId,o=e.getIn(["settings","columns"]),i=o.findIndex(function(e){return e.get("uuid")===t});return{settings:t&&i>=0?o.get(i).get("params"):e.getIn(["settings","community"])}},function(e,n){var t=n.columnId;return{onChange:function(n,o){e(t?Object(O.f)(t,n,o):Object(I.c)(["community"].concat(n),o))}}})(g.a),C=t(671);t.d(n,"default",function(){return k});var w=Object(p.f)({title:{id:"column.community",defaultMessage:"Local timeline"}}),k=Object(m.connect)(function(e,n){var t=n.onlyMedia,o=n.columnId,i=o,c=e.getIn(["settings","columns"]),a=c.findIndex(function(e){return e.get("uuid")===i}),l=e.getIn(["timelines","community"+(t?":media":"")]);return{hasUnread:!!l&&(l.get("unread")>0||l.get("pendingItems").size>0),onlyMedia:o&&a>=0?c.get(a).getIn(["params","other","onlyMedia"]):e.getIn(["settings","community","other","onlyMedia"])}})(o=Object(p.g)((c=i=function(e){function n(){for(var n,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return n=e.call.apply(e,[this].concat(o))||this,Object(d.a)(Object(l.a)(n),"handlePin",function(){var e=n.props,t=e.columnId,o=e.dispatch,i=e.onlyMedia;o(t?Object(O.h)(t):Object(O.e)("COMMUNITY",{other:{onlyMedia:i}}))}),Object(d.a)(Object(l.a)(n),"handleMove",function(e){var t=n.props,o=t.columnId;(0,t.dispatch)(Object(O.g)(o,e))}),Object(d.a)(Object(l.a)(n),"handleHeaderClick",function(){n.column.scrollTop()}),Object(d.a)(Object(l.a)(n),"setRef",function(e){n.column=e}),Object(d.a)(Object(l.a)(n),"handleLoadMore",function(e){var t=n.props,o=t.dispatch,i=t.onlyMedia;o(Object(M.r)({maxId:e,onlyMedia:i}))}),n}Object(s.a)(n,e);var t=n.prototype;return t.componentDidMount=function(){var e=this.props,n=e.dispatch,t=e.onlyMedia;n(Object(M.r)({onlyMedia:t})),this.disconnect=n(Object(C.a)({onlyMedia:t}))},t.componentDidUpdate=function(e){if(e.onlyMedia!==this.props.onlyMedia){var n=this.props,t=n.dispatch,o=n.onlyMedia;this.disconnect(),t(Object(M.r)({onlyMedia:o})),this.disconnect=t(Object(C.a)({onlyMedia:o}))}},t.componentWillUnmount=function(){this.disconnect&&(this.disconnect(),this.disconnect=null)},t.render=function(){var e=this.props,n=e.intl,t=e.hasUnread,o=e.columnId,i=e.multiColumn,c=e.onlyMedia,l=!!o;return u.a.createElement(f.a,{ref:this.setRef,name:"local",label:n.formatMessage(w.title)},Object(a.a)(j.a,{icon:"users",active:t,title:n.formatMessage(w.title),onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:l,multiColumn:i},void 0,Object(a.a)(v,{columnId:o})),Object(a.a)(y.a,{trackScroll:!l,scrollKey:"community_timeline-"+o,timelineId:"community"+(c?":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!"})}))},n}(u.a.PureComponent),Object(d.a)(i,"defaultProps",{onlyMedia:!1}),Object(d.a)(i,"contextTypes",{router:b.a.object}),o=c))||o)||o}}]);
//# sourceMappingURL=community_timeline.js.map