X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=priv%2Fstatic%2Fpacks%2Fflavours%2Fglitch%2Fasync%2Faccount_gallery.js;h=a282e6ebc50325297549479c0092a0f28914ba96;hb=c7cdc553ff9bd7a068274d9b4b71008d9df04723;hp=cfdf0cd2ffd4465dd63e7141966ee89df50936da;hpb=6e6f1ead31ba26bc42b14226e3c0876042f0596a;p=akkoma
diff --git a/priv/static/packs/flavours/glitch/async/account_gallery.js b/priv/static/packs/flavours/glitch/async/account_gallery.js
index cfdf0cd2f..a282e6ebc 100644
--- a/priv/static/packs/flavours/glitch/async/account_gallery.js
+++ b/priv/static/packs/flavours/glitch/async/account_gallery.js
@@ -1,2 +1,2 @@
-(window.webpackJsonp=window.webpackJsonp||[]).push([[48],{764:function(e,t,a){"use strict";a.r(t);var n=a(0),o=a(2),c=a(7),i=a(1),s=a(3),r=a.n(s),l=a(12),d=a(18),p=a.n(d),u=a(5),h=a.n(u),b=a(23),m=a(33),O=a(293),g=a(662),f=a(992),j=a(19),v=a(148),y=a(25),_=a(15),I=a(10),M=a.n(I),L=a(208),w=a(149),R=function(e){function t(){for(var t,a=arguments.length,n=new Array(a),c=0;c0?t.props.attachments.last().getIn(["status","id"]):void 0)}),Object(i.a)(Object(o.a)(t),"handleScroll",function(e){var a=e.target,n=a.scrollTop;150>a.scrollHeight-n-a.clientHeight&&!t.props.isLoading&&t.handleScrollToBottom()}),Object(i.a)(Object(o.a)(t),"handleLoadMore",function(e){t.props.dispatch(Object(m.p)(t.props.params.accountId,{maxId:e}))}),Object(i.a)(Object(o.a)(t),"handleLoadOlder",function(e){e.preventDefault(),t.handleScrollToBottom()}),Object(i.a)(Object(o.a)(t),"shouldUpdateScroll",function(e,t){var a=t.location;return!(((e||{}).location||{}).state||{}).mastodonModalOpen&&!(a.state&&a.state.mastodonModalOpen)}),Object(i.a)(Object(o.a)(t),"setColumnRef",function(e){t.column=e}),Object(i.a)(Object(o.a)(t),"handleOpenMedia",function(e){if(["video","audio"].includes(e.get("type")))t.props.dispatch(Object(E.d)("VIDEO",{media:e,status:e.get("status")}));else{var a=e.getIn(["status","media_attachments"]),n=a.findIndex(function(t){return t.get("id")===e.get("id")});t.props.dispatch(Object(E.d)("MEDIA",{media:a,index:n,status:e.get("status")}))}}),Object(i.a)(Object(o.a)(t),"handleRef",function(e){e&&t.setState({width:e.offsetWidth})}),t}Object(c.a)(t,e);var a=t.prototype;return a.componentDidMount=function(){this.props.dispatch(Object(b.F)(this.props.params.accountId)),this.props.dispatch(Object(m.p)(this.props.params.accountId))},a.componentWillReceiveProps=function(e){e.params.accountId!==this.props.params.accountId&&e.params.accountId&&(this.props.dispatch(Object(b.F)(e.params.accountId)),this.props.dispatch(Object(m.p)(this.props.params.accountId)))},a.render=function(){var e=this,t=this.props,a=t.attachments,o=t.isLoading,c=t.hasMore,i=t.isAccount,s=this.state.width;if(!i)return Object(n.a)(g.a,{},void 0,Object(n.a)(D.a,{}));if(!a&&o)return Object(n.a)(g.a,{},void 0,Object(n.a)(O.a,{}));var l=null;return!c||o&&0===a.size||(l=Object(n.a)(N.a,{visible:!o,onClick:this.handleLoadOlder})),r.a.createElement(g.a,{ref:this.setColumnRef},Object(n.a)(f.a,{onClick:this.handleHeaderClick}),Object(n.a)(T.a,{scrollKey:"account_gallery",shouldUpdateScroll:this.shouldUpdateScroll},void 0,Object(n.a)("div",{className:"scrollable scrollable--flex",onScroll:this.handleScroll},void 0,Object(n.a)(S.a,{accountId:this.props.params.accountId}),r.a.createElement("div",{role:"feed",className:"account-gallery__container",ref:this.handleRef},a.map(function(t,o){return null===t?Object(n.a)(q,{maxId:o>0?a.getIn(o-1,"id"):null,onLoadMore:e.handleLoadMore},"more:"+a.getIn(o+1,"id")):Object(n.a)(R,{attachment:t,displayWidth:s,onOpenMedia:e.handleOpenMedia},t.get("id"))}),l),o&&0===a.size&&Object(n.a)("div",{className:"scrollable__append"},void 0,Object(n.a)(O.a,{})))))},t}(j.a),Object(i.a)(C,"propTypes",{params:h.a.object.isRequired,dispatch:h.a.func.isRequired,attachments:p.a.list.isRequired,isLoading:h.a.bool,hasMore:h.a.bool,isAccount:h.a.bool}),x=k))||x}}]);
+(window.webpackJsonp=window.webpackJsonp||[]).push([[50],{859:function(t,e,a){"use strict";a.r(e),a.d(e,"default",(function(){return H}));var n=a(0),o=a(2),c=a(9),i=a(6),s=a(8),r=a(1),l=a(3),d=a.n(l),p=a(15),u=a(16),h=a.n(u),b=a(5),m=a.n(b),f=a(24),O=a(34),g=a(305),j=a(756),v=a(1079),y=a(21),_=a(108),I=a(215),M=a(14),L=a.n(M),w=a(25),R=a(18),C=a(154);var x=function(t){Object(s.a)(a,t);var e;e=a;function a(){for(var e,a=arguments.length,n=new Array(a),c=0;c0?e.props.attachments.last().getIn(["status","id"]):void 0)})),Object(r.a)(Object(o.a)(e),"handleScroll",(function(t){var a=t.target,n=a.scrollTop;150>a.scrollHeight-n-a.clientHeight&&!e.props.isLoading&&e.handleScrollToBottom()})),Object(r.a)(Object(o.a)(e),"handleLoadMore",(function(t){e.props.dispatch(Object(O.p)(e.props.params.accountId,{maxId:t}))})),Object(r.a)(Object(o.a)(e),"handleLoadOlder",(function(t){t.preventDefault(),e.handleScrollToBottom()})),Object(r.a)(Object(o.a)(e),"shouldUpdateScroll",(function(t,e){var a=e.location;return!(((t||{}).location||{}).state||{}).mastodonModalOpen&&!(a.state&&a.state.mastodonModalOpen)})),Object(r.a)(Object(o.a)(e),"setColumnRef",(function(t){e.column=t})),Object(r.a)(Object(o.a)(e),"handleOpenMedia",(function(t){if("video"===t.get("type"))e.props.dispatch(Object(q.d)("VIDEO",{media:t,status:t.get("status")}));else if("audio"===t.get("type"))e.props.dispatch(Object(q.d)("AUDIO",{media:t,status:t.get("status")}));else{var a=t.getIn(["status","media_attachments"]),n=a.findIndex((function(e){return e.get("id")===t.get("id")}));e.props.dispatch(Object(q.d)("MEDIA",{media:a,index:n,status:t.get("status")}))}})),Object(r.a)(Object(o.a)(e),"handleRef",(function(t){t&&e.setState({width:t.offsetWidth})})),e}var a=e.prototype;return a.componentDidMount=function(){this.props.dispatch(Object(f.F)(this.props.params.accountId)),this.props.dispatch(Object(O.p)(this.props.params.accountId))},a.componentWillReceiveProps=function(t){t.params.accountId!==this.props.params.accountId&&t.params.accountId&&(this.props.dispatch(Object(f.F)(t.params.accountId)),this.props.dispatch(Object(O.p)(this.props.params.accountId)))},a.render=function(){var t=this,e=this.props,a=e.attachments,o=e.isLoading,c=e.hasMore,i=e.isAccount,s=e.multiColumn,r=this.state.width;if(!i)return Object(n.a)(j.a,{},void 0,Object(n.a)(E.a,{}));if(!a&&o)return Object(n.a)(j.a,{},void 0,Object(n.a)(g.a,{}));var l=null;return!c||o&&0===a.size||(l=Object(n.a)(A.a,{visible:!o,onClick:this.handleLoadOlder})),d.a.createElement(j.a,{ref:this.setColumnRef},Object(n.a)(v.a,{onClick:this.handleHeaderClick,multiColumn:s}),Object(n.a)(N.a,{scrollKey:"account_gallery",shouldUpdateScroll:this.shouldUpdateScroll},void 0,Object(n.a)("div",{className:"scrollable scrollable--flex",onScroll:this.handleScroll},void 0,Object(n.a)(T.a,{accountId:this.props.params.accountId}),d.a.createElement("div",{role:"feed",className:"account-gallery__container",ref:this.handleRef},a.map((function(e,o){return null===e?Object(n.a)(W,{maxId:o>0?a.getIn(o-1,"id"):null,onLoadMore:t.handleLoadMore},"more:"+a.getIn(o+1,"id")):Object(n.a)(x,{attachment:e,displayWidth:r,onOpenMedia:t.handleOpenMedia},e.get("id"))})),l),o&&0===a.size&&Object(n.a)("div",{className:"scrollable__append"},void 0,Object(n.a)(g.a,{})))))},e}(y.a),Object(r.a)(k,"propTypes",{params:m.a.object.isRequired,dispatch:m.a.func.isRequired,attachments:h.a.list.isRequired,isLoading:m.a.bool,hasMore:m.a.bool,isAccount:m.a.bool,multiColumn:m.a.bool}),S=D))||S}}]);
//# sourceMappingURL=account_gallery.js.map
\ No newline at end of file