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

2 lines
3.4 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[46],{728:function(e,t,n){"use strict";n.r(t);var o,a,c,l=n(1),i=n(6),d=n(0),s=n(2),r=n(3),u=n.n(r),m=n(20),h=n(7),p=n(5),b=n.n(p),O=n(626),j=n(430),y=n(428),f=n(32),M=n(205),g=n(951),v=n(84),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(401);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,c=e.getIn(["settings","columns"]),i=c.findIndex(function(e){return e.get("uuid")===a});return{hasUnread:0<e.getIn(["timelines","community"+(n?":media":""),"unread"]),onlyMedia:o&&0<=i?c.get(i).getIn(["params","other","onlyMedia"]):e.getIn(["settings","community","other","onlyMedia"])}})(o=Object(h.g)((c=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(d.a)(Object(d.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(d.a)(Object(d.a)(a)),"handleMove",function(e){var t=a.props,n=t.columnId;(0,t.dispatch)(Object(M.g)(n,e))}),Object(s.a)(Object(d.a)(Object(d.a)(a)),"handleHeaderClick",function(){a.column.scrollTop()}),Object(s.a)(Object(d.a)(Object(d.a)(a)),"setRef",function(e){a.column=e}),Object(s.a)(Object(d.a)(Object(d.a)(a)),"handleLoadMore",function(e){var t=a.props,n=t.dispatch,o=t.onlyMedia;n(Object(f.o)({maxId:e,onlyMedia:o}))}),Object(s.a)(Object(d.a)(Object(d.a)(a)),"shouldUpdateScroll",function(e,t){var n=t.location;return!(n.state&&n.state.mastodonModalOpen)}),a}Object(i.a)(e,o);var t=e.prototype;return t.componentDidMount=function(){var e=this.props,t=e.dispatch,n=e.onlyMedia;t(Object(f.o)({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(f.o)({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,c=e.onlyMedia,i=!!o;return u.a.createElement(j.a,{ref:this.setRef,name:"local",label:t.formatMessage(U.title)},Object(l.a)(y.a,{icon:"users",active:n,title:t.formatMessage(U.title),onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:i,multiColumn:a},void 0,Object(l.a)(I,{columnId:o})),Object(l.a)(O.a,{trackScroll:!i,scrollKey:"community_timeline-"+o,shouldUpdateScroll:this.shouldUpdateScroll,timelineId:"community"+(c?":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=c))||o)||o}}]);
//# sourceMappingURL=community_timeline.js.map