honkoma/priv/static/packs/features/community_timeline.js

2 lines
3.2 KiB
JavaScript
Raw Normal View History

2020-01-22 15:00:23 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{766:function(e,t,n){"use strict";n.r(t);var o,i,c,a=n(0),l=n(2),d=n(7),s=n(1),r=n(3),u=n.n(r),m=n(12),p=n(6),h=n(5),b=n.n(h),y=n(977),f=n(669),j=n(665),M=n(35),O=n(245),g=n(1092),I=n(72),v=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(O.f)(n,t,o):Object(I.c)(["community"].concat(t),o))}}})(g.a),C=n(672);n.d(t,"default",function(){return U});var w=Object(p.f)({title:{id:"column.community",defaultMessage:"Local timeline"}}),U=Object(m.connect)(function(e,t){var n=t.onlyMedia,o=t.columnId,i=o,c=e.getIn(["settings","columns"]),a=c.findIndex(function(e){return e.get("uuid")===i}),l=e.getIn(["timelines","community"+(n?":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 t(){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(s.a)(Object(l.a)(t),"handlePin",function(){var e=t.props,n=e.columnId,o=e.dispatch,i=e.onlyMedia;o(n?Object(O.h)(n):Object(O.e)("COMMUNITY",{other:{onlyMedia:i}}))}),Object(s.a)(Object(l.a)(t),"handleMove",function(e){var n=t.props,o=n.columnId;(0,n.dispatch)(Object(O.g)(o,e))}),Object(s.a)(Object(l.a)(t),"handleHeaderClick",function(){t.column.scrollTop()}),Object(s.a)(Object(l.a)(t),"setRef",function(e){t.column=e}),Object(s.a)(Object(l.a)(t),"handleLoadMore",function(e){var n=t.props,o=n.dispatch,i=n.onlyMedia;o(Object(M.r)({maxId:e,onlyMedia:i}))}),t}Object(d.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this.props,t=e.dispatch,n=e.onlyMedia;t(Object(M.r)({onlyMedia:n})),this.disconnect=t(Object(C.a)({onlyMedia:n}))},n.componentDidUpdate=function(e){if(e.onlyMedia!==this.props.onlyMedia){var t=this.props,n=t.dispatch,o=t.onlyMedia;this.disconnect(),n(Object(M.r)({onlyMedia:o})),this.disconnect=n(Object(C.a)({onlyMedia:o}))}},n.componentWillUnmount=function(){this.disconnect&&(this.disconnect(),this.disconnect=null)},n.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(f.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)(v,{columnId:i})),Object(a.a)(y.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}))},t}(u.a.PureComponent),Object(s.a)(i,"contextTypes",{router:b.a.object}),Object(s.a)(i,"defaultProps",{onlyMedia:!1}),o=c))||o)||o}}]);
//# sourceMappingURL=community_timeline.js.map