spc-pleroma/priv/static/packs/flavours/glitch/async/following.js

2 lines
2.5 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[57],{659:function(a,t,c){"use strict";c.r(t),c.d(t,"default",function(){return y});var o,e,n,s=c(0),r=c(3),i=c(7),p=c(1),l=c(2),d=c.n(l),u=c(24),h=c(5),b=c.n(h),O=c(27),j=c.n(O),f=c(271),m=c(22),I=c(426),v=c(600),w=c(624),g=c(908),M=c(912),k=c(906),S=c(25),y=Object(u.connect)(function(a,t){return{accountIds:a.getIn(["user_lists","following",t.params.accountId,"items"]),hasMore:!!a.getIn(["user_lists","following",t.params.accountId,"next"])}})((n=e=function(e){function a(){for(var c,a=arguments.length,t=new Array(a),o=0;o<a;o++)t[o]=arguments[o];return c=e.call.apply(e,[this].concat(t))||this,Object(p.a)(Object(r.a)(c),"handleHeaderClick",function(){c.column.scrollTop()}),Object(p.a)(Object(r.a)(c),"handleScroll",function(a){var t=a.target;t.scrollTop===t.scrollHeight-t.clientHeight&&c.props.hasMore&&c.props.dispatch(Object(m.E)(c.props.params.accountId))}),Object(p.a)(Object(r.a)(c),"handleLoadMore",function(a){a.preventDefault(),c.props.dispatch(Object(m.E)(c.props.params.accountId))}),Object(p.a)(Object(r.a)(c),"shouldUpdateScroll",function(a,t){var c=t.location;return!(((a||{}).location||{}).state||{}).mastodonModalOpen&&!(c.state&&c.state.mastodonModalOpen)}),Object(p.a)(Object(r.a)(c),"setRef",function(a){c.column=a}),c}Object(i.a)(a,e);var t=a.prototype;return t.componentWillMount=function(){this.props.dispatch(Object(m.F)(this.props.params.accountId)),this.props.dispatch(Object(m.I)(this.props.params.accountId))},t.componentWillReceiveProps=function(a){a.params.accountId!==this.props.params.accountId&&a.params.accountId&&(this.props.dispatch(Object(m.F)(a.params.accountId)),this.props.dispatch(Object(m.I)(a.params.accountId)))},t.render=function(){var a=this.props,t=a.accountIds,c=a.hasMore,o=null;return t?(c&&(o=Object(s.a)(k.a,{onClick:this.handleLoadMore})),d.a.createElement(w.a,{ref:this.setRef},Object(s.a)(g.a,{onClick:this.handleHeaderClick}),Object(s.a)(I.a,{scrollKey:"following",shouldUpdateScroll:this.shouldUpdateScroll},void 0,Object(s.a)("div",{className:"scrollable",onScroll:this.handleScroll},void 0,Object(s.a)("div",{className:"following"},void 0,Object(s.a)(M.a,{accountId:this.props.params.accountId,hideTabs:!0}),t.map(function(a){return Object(s.a)(v.a,{id:a,withNote:!1},a)}),o))))):Object(s.a)(w.a,{},void 0,Object(s.a)(f.a,{}))},a}(S.a),Object(p.a)(e,"propTypes",{params:b.a.object.isRequired,dispatch:b.a.func.isRequired,accountIds:j.a.list,hasMore:b.a.bool}),o=n))||o}}]);
//# sourceMappingURL=following.js.map