honkoma/priv/static/packs/flavours/glitch/async/community_timeline.js

2 lines
3.2 KiB
JavaScript
Raw Normal View History

2020-02-29 05:41:13 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[55],{831:function(e,n,t){"use strict";t.r(n);var o,i,c,a=t(0),l=t(2),d=t(7),r=t(1),s=t(3),u=t.n(s),m=t(13),p=t(6),h=t(5),b=t.n(h),f=t(1033),y=t(734),j=t(732),O=t(32),M=t(249),g=t(1115),v=t(69),I=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(M.f)(t,n,o):Object(v.c)(["community"].concat(n),o))}}}))(g.a),C=t(739);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.columnId,o=t,i=e.getIn(["settings","columns"]),c=i.findIndex((function(e){return e.get("uuid")===o})),a=t&&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){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(r.a)(Object(l.a)(n),"handlePin",(function(){var e=n.props,t=e.columnId,o=e.dispatch,i=e.onlyMedia;o(t?Object(M.h)(t):Object(M.e)("COMMUNITY",{other:{onlyMedia:i}}))})),Object(r.a)(Object(l.a)(n),"handleMove",(function(e){var t=n.props,o=t.columnId;(0,t.dispatch)(Object(M.g)(o,e))})),Object(r.a)(Object(l.a)(n),"handleHeaderClick",(function(){n.column.scrollTop()})),Object(r.a)(Object(l.a)(n),"setRef",(function(e){n.column=e})),Object(r.a)(Object(l.a)(n),"handleLoadMore",(function(e){var t=n.props,o=t.dispatch,i=t.onlyMedia;o(Object(O.r)({maxId:e,onlyMedia:i}))})),n}Object(d.a)(n,e);var t=n.prototype;return t.componentDidMount=function(){var e=this.props,n=e.dispatch,t=e.onlyMedia;n(Object(O.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(O.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(y.a,{ref:this.setRef,name:"local",bindToDocument:!i,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)(I,{columnId:o})),Object(a.a)(f.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!"}),bindToDocument:!i}))},n}(u.a.PureComponent),Object(r.a)(i,"defaultProps",{onlyMedia:!1}),Object(r.a)(i,"contextTypes",{router:b.a.object}),o=c))||o)||o}}]);
2018-09-16 21:17:34 +00:00
//# sourceMappingURL=community_timeline.js.map