akkoma/priv/static/packs/flavours/glitch/async/account_timeline.js
2019-06-26 21:06:28 +02:00

2 lines
2.8 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[44],{658:function(t,e,a){"use strict";a.r(e),a.d(e,"default",function(){return S});var s,c,i,o=a(0),n=a(2),p=a(6),r=a(1),d=a(3),u=a.n(d),h=a(21),l=a(26),b=a.n(l),m=a(5),j=a.n(m),O=a(23),I=a(34),f=a(902),w=a(271),R=a(625),g=a(913),L=a(916),M=a(4),v=a(25),y=a(7),k=a(264),A=a(896),S=Object(h.connect)(function(t,e){var a=e.params.accountId,s=e.withReplies,c=void 0!==s&&s,i=c?a+":with_replies":a;return{isAccount:!!t.getIn(["accounts",a]),statusIds:t.getIn(["timelines","account:"+i,"items"],Object(M.List)()),featuredStatusIds:c?Object(M.List)():t.getIn(["timelines","account:"+a+":pinned","items"],Object(M.List)()),isLoading:t.getIn(["timelines","account:"+i,"isLoading"]),hasMore:t.getIn(["timelines","account:"+i,"hasMore"])}})((i=c=function(c){function t(){for(var e,t=arguments.length,a=new Array(t),s=0;s<t;s++)a[s]=arguments[s];return e=c.call.apply(c,[this].concat(a))||this,Object(r.a)(Object(n.a)(e),"handleHeaderClick",function(){e.column.scrollTop()}),Object(r.a)(Object(n.a)(e),"handleLoadMore",function(t){e.props.dispatch(Object(I.p)(e.props.params.accountId,{maxId:t,withReplies:e.props.withReplies}))}),Object(r.a)(Object(n.a)(e),"setRef",function(t){e.column=t}),e}Object(p.a)(t,c);var e=t.prototype;return e.componentWillMount=function(){var t=this.props,e=t.params.accountId,a=t.withReplies;this.props.dispatch(Object(O.F)(e)),this.props.dispatch(Object(k.d)(e)),a||this.props.dispatch(Object(I.n)(e)),this.props.dispatch(Object(I.p)(e,{withReplies:a}))},e.componentWillReceiveProps=function(t){(t.params.accountId!==this.props.params.accountId&&t.params.accountId||t.withReplies!==this.props.withReplies)&&(this.props.dispatch(Object(O.F)(t.params.accountId)),this.props.dispatch(Object(k.d)(t.params.accountId)),t.withReplies||this.props.dispatch(Object(I.n)(t.params.accountId)),this.props.dispatch(Object(I.p)(t.params.accountId,{withReplies:t.params.withReplies})))},e.render=function(){var t=this.props,e=t.statusIds,a=t.featuredStatusIds,s=t.isLoading,c=t.hasMore;return t.isAccount?!e&&s?Object(o.a)(R.a,{},void 0,Object(o.a)(w.a,{})):u.a.createElement(R.a,{ref:this.setRef,name:"account"},Object(o.a)(g.a,{onClick:this.handleHeaderClick}),Object(o.a)(f.a,{prepend:Object(o.a)(L.a,{accountId:this.props.params.accountId}),alwaysPrepend:!0,scrollKey:"account_timeline",statusIds:e,featuredStatusIds:a,isLoading:s,hasMore:c,onLoadMore:this.handleLoadMore,emptyMessage:Object(o.a)(y.b,{id:"empty_column.account_timeline",defaultMessage:"No toots here!"})})):Object(o.a)(R.a,{},void 0,Object(o.a)(A.a,{}))},t}(v.a),Object(r.a)(c,"propTypes",{params:j.a.object.isRequired,dispatch:j.a.func.isRequired,statusIds:b.a.list,featuredStatusIds:b.a.list,isLoading:j.a.bool,hasMore:j.a.bool,withReplies:j.a.bool,isAccount:j.a.bool}),s=i))||s}}]);
//# sourceMappingURL=account_timeline.js.map