mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-20 08:28:26 +00:00
2 lines
2.6 KiB
JavaScript
2 lines
2.6 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[57],{660:function(a,t,c){"use strict";c.r(t),c.d(t,"default",function(){return R});var o,e,n,s=c(0),r=c(2),i=c(6),p=c(1),l=c(3),d=c.n(l),u=c(21),h=c(5),b=c.n(h),O=c(26),j=c.n(O),f=c(271),m=c(23),I=c(427),v=c(630),w=c(625),g=c(913),M=c(916),k=c(912),S=c(25),y=c(896),R=Object(u.connect)(function(a,t){return{isAccount:!!a.getIn(["accounts",t.params.accountId]),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;if(!a.isAccount)return Object(s.a)(w.a,{},void 0,Object(s.a)(y.a,{}));var 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,isAccount:b.a.bool}),o=n))||o}}]);
|
|
//# sourceMappingURL=following.js.map
|