qb_akkoma/priv/static/packs/features/account_timeline.js
2019-06-26 21:06:28 +02:00

2 lines
No EOL
2.9 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{678:function(t,a,e){"use strict";e.r(a),e.d(a,"default",function(){return _});var s,c,i,p=e(0),o=e(2),n=e(6),r=e(1),d=(e(3),e(21)),u=e(26),l=e.n(u),h=e(5),b=e.n(h),m=e(27),j=e(35),I=e(914),O=e(272),f=e(626),w=e(917),g=e(629),v=e(4),R=e(25),y=e(7),M=e(265),L=e(897),S=Object(v.List)(),_=Object(d.connect)(function(t,a){var e=a.params.accountId,s=a.withReplies,c=void 0!==s&&s,i=c?e+":with_replies":e;return{isAccount:!!t.getIn(["accounts",e]),statusIds:t.getIn(["timelines","account:"+i,"items"],S),featuredStatusIds:c?Object(v.List)():t.getIn(["timelines","account:"+e+":pinned","items"],S),isLoading:t.getIn(["timelines","account:"+i,"isLoading"]),hasMore:t.getIn(["timelines","account:"+i,"hasMore"]),blockedBy:t.getIn(["relationships",e,"blocked_by"],!1)}})((i=c=function(c){function t(){for(var a,t=arguments.length,e=new Array(t),s=0;s<t;s++)e[s]=arguments[s];return a=c.call.apply(c,[this].concat(e))||this,Object(r.a)(Object(o.a)(a),"handleLoadMore",function(t){a.props.dispatch(Object(j.p)(a.props.params.accountId,{maxId:t,withReplies:a.props.withReplies}))}),a}Object(n.a)(t,c);var a=t.prototype;return a.componentWillMount=function(){var t=this.props,a=t.params.accountId,e=t.withReplies;this.props.dispatch(Object(m.A)(a)),this.props.dispatch(Object(M.d)(a)),e||this.props.dispatch(Object(j.n)(a)),this.props.dispatch(Object(j.p)(a,{withReplies:e}))},a.componentWillReceiveProps=function(t){(t.params.accountId!==this.props.params.accountId&&t.params.accountId||t.withReplies!==this.props.withReplies)&&(this.props.dispatch(Object(m.A)(t.params.accountId)),this.props.dispatch(Object(M.d)(t.params.accountId)),t.withReplies||this.props.dispatch(Object(j.n)(t.params.accountId)),this.props.dispatch(Object(j.p)(t.params.accountId,{withReplies:t.params.withReplies})))},a.render=function(){var t=this.props,a=t.shouldUpdateScroll,e=t.statusIds,s=t.featuredStatusIds,c=t.isLoading,i=t.hasMore,o=t.blockedBy;if(!t.isAccount)return Object(p.a)(f.a,{},void 0,Object(p.a)(L.a,{}));if(!e&&c)return Object(p.a)(f.a,{},void 0,Object(p.a)(O.a,{}));var n=o?Object(p.a)(y.b,{id:"empty_column.account_unavailable",defaultMessage:"Profile unavailable"}):Object(p.a)(y.b,{id:"empty_column.account_timeline",defaultMessage:"No toots here!"});return Object(p.a)(f.a,{},void 0,Object(p.a)(g.a,{}),Object(p.a)(I.a,{prepend:Object(p.a)(w.a,{accountId:this.props.params.accountId}),alwaysPrepend:!0,scrollKey:"account_timeline",statusIds:o?S:e,featuredStatusIds:s,isLoading:c,hasMore:i,onLoadMore:this.handleLoadMore,shouldUpdateScroll:a,emptyMessage:n}))},t}(R.a),Object(r.a)(c,"propTypes",{params:b.a.object.isRequired,dispatch:b.a.func.isRequired,shouldUpdateScroll:b.a.func,statusIds:l.a.list,featuredStatusIds:l.a.list,isLoading:b.a.bool,hasMore:b.a.bool,withReplies:b.a.bool,blockedBy:b.a.bool,isAccount:b.a.bool}),s=i))||s}}]);
//# sourceMappingURL=account_timeline.js.map