akkoma/priv/static/packs/flavours/glitch/async/following.js
Haelwenn (lanodan) Monnier 2a850abbeb
MastoFE: Bundle 2020-01-20
2020-02-29 06:41:13 +01:00

2 lines
No EOL
2.5 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[65],{771:function(t,a,c){"use strict";c.r(a),c.d(a,"default",(function(){return A}));var o,e,n,s=c(0),r=c(2),i=c(7),p=c(1),u=c(62),l=c.n(u),d=c(3),h=c.n(d),b=c(13),m=c(5),f=c.n(m),j=c(14),O=c.n(j),I=c(299),w=c(22),g=c(6),M=c(466),v=c(730),y=c(1052),C=c(1056),T=c(18),k=c(1029),R=c(1022),A=Object(b.connect)((function(t,a){return{isAccount:!!t.getIn(["accounts",a.params.accountId]),accountIds:t.getIn(["user_lists","following",a.params.accountId,"items"]),hasMore:!!t.getIn(["user_lists","following",a.params.accountId,"next"])}}))((n=e=function(t){function a(){for(var a,c=arguments.length,o=new Array(c),e=0;e<c;e++)o[e]=arguments[e];return a=t.call.apply(t,[this].concat(o))||this,Object(p.a)(Object(r.a)(a),"handleHeaderClick",(function(){a.column.scrollTop()})),Object(p.a)(Object(r.a)(a),"handleScroll",(function(t){var c=t.target;c.scrollTop===c.scrollHeight-c.clientHeight&&a.props.hasMore&&a.props.dispatch(Object(w.E)(a.props.params.accountId))})),Object(p.a)(Object(r.a)(a),"handleLoadMore",l()((function(){a.props.dispatch(Object(w.E)(a.props.params.accountId))}),300,{leading:!0})),Object(p.a)(Object(r.a)(a),"setRef",(function(t){a.column=t})),a}Object(i.a)(a,t);var c=a.prototype;return c.componentWillMount=function(){this.props.accountIds||(this.props.dispatch(Object(w.F)(this.props.params.accountId)),this.props.dispatch(Object(w.I)(this.props.params.accountId)))},c.componentWillReceiveProps=function(t){t.params.accountId!==this.props.params.accountId&&t.params.accountId&&(this.props.dispatch(Object(w.F)(t.params.accountId)),this.props.dispatch(Object(w.I)(t.params.accountId)))},c.render=function(){var t=this.props,a=t.accountIds,c=t.hasMore,o=t.isAccount,e=t.multiColumn;if(!o)return Object(s.a)(v.a,{},void 0,Object(s.a)(k.a,{}));if(!a)return Object(s.a)(v.a,{},void 0,Object(s.a)(I.a,{}));var n=Object(s.a)(g.b,{id:"account.follows.empty",defaultMessage:"This user doesn't follow anyone yet."});return h.a.createElement(v.a,{ref:this.setRef},Object(s.a)(y.a,{onClick:this.handleHeaderClick,multiColumn:e}),Object(s.a)(R.a,{scrollKey:"following",hasMore:c,onLoadMore:this.handleLoadMore,prepend:Object(s.a)(C.a,{accountId:this.props.params.accountId,hideTabs:!0}),alwaysPrepend:!0,emptyMessage:n,bindToDocument:!e},void 0,a.map((function(t){return Object(s.a)(M.a,{id:t,withNote:!1},t)}))))},a}(T.a),Object(p.a)(e,"propTypes",{params:f.a.object.isRequired,dispatch:f.a.func.isRequired,accountIds:O.a.list,hasMore:f.a.bool,isAccount:f.a.bool,multiColumn:f.a.bool}),o=n))||o}}]);
//# sourceMappingURL=following.js.map