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