akkoma/priv/static/packs/flavours/glitch/async/public_timeline.js

2 lines
3.3 KiB
JavaScript
Raw Normal View History

(window.webpackJsonp=window.webpackJsonp||[]).push([[73],{730:function(e,t,n){"use strict";n.r(t);var o,a,c,l=n(1),i=n(7),r=n(0),d=n(2),s=n(3),u=n.n(s),b=n(20),p=n(6),h=n(5),m=n.n(h),j=n(626),O=n(430),f=n(428),M=n(32),g=n(206),y=n(959),v=n(85),I=Object(b.connect)(function(e,t){var n=t.columnId,o=e.getIn(["settings","columns"]),a=o.findIndex(function(e){return e.get("uuid")===n});return{settings:n&&0<=a?o.get(a).get("params"):e.getIn(["settings","public"])}},function(n,e){var o=e.columnId;return{onChange:function(e,t){n(o?Object(g.f)(o,e,t):Object(v.c)(["public"].concat(e),t))}}})(y.a),w=n(401);n.d(t,"default",function(){return k});var C=Object(p.f)({title:{id:"column.public",defaultMessage:"Federated timeline"}}),k=Object(b.connect)(function(e,t){var n=t.onlyMedia,o=t.columnId,a=o,c=e.getIn(["settings","columns"]),i=c.findIndex(function(e){return e.get("uuid")===a});return{hasUnread:0<e.getIn(["timelines","public"+(n?":media":""),"unread"]),onlyMedia:o&&0<=i?c.get(i).getIn(["params","other","onlyMedia"]):e.getIn(["settings","public","other","onlyMedia"])}})(o=Object(p.g)((c=a=function(o){function e(){for(var a,e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a=o.call.apply(o,[this].concat(t))||this,Object(d.a)(Object(r.a)(Object(r.a)(a)),"handlePin",function(){var e=a.props,t=e.columnId,n=e.dispatch,o=e.onlyMedia;n(t?Object(g.h)(t):Object(g.e)("PUBLIC",{other:{onlyMedia:o}}))}),Object(d.a)(Object(r.a)(Object(r.a)(a)),"handleMove",function(e){var t=a.props,n=t.columnId;(0,t.dispatch)(Object(g.g)(n,e))}),Object(d.a)(Object(r.a)(Object(r.a)(a)),"handleHeaderClick",function(){a.column.scrollTop()}),Object(d.a)(Object(r.a)(Object(r.a)(a)),"setRef",function(e){a.column=e}),Object(d.a)(Object(r.a)(Object(r.a)(a)),"handleLoadMore",function(e){var t=a.props,n=t.dispatch,o=t.onlyMedia;n(Object(M.t)({maxId:e,onlyMedia:o}))}),Object(d.a)(Object(r.a)(Object(r.a)(a)),"shouldUpdateScroll",function(e,t){var n=t.location;return!(n.state&&n.state.mastodonModalOpen)}),a}Object(i.a)(e,o);var t=e.prototype;return t.componentDidMount=function(){var e=this.props,t=e.dispatch,n=e.onlyMedia;t(Object(M.t)({onlyMedia:n})),this.disconnect=t(Object(w.e)({onlyMedia:n}))},t.componentDidUpdate=function(e){if(e.onlyMedia!==this.props.onlyMedia){var t=this.props,n=t.dispatch,o=t.onlyMedia;this.disconnect(),n(Object(M.t)({onlyMedia:o})),this.disconnect=n(Object(w.e)({onlyMedia:o}))}},t.componentWillUnmount=function(){this.disconnect&&(this.disconnect(),this.disconnect=null)},t.render=function(){var e=this.props,t=e.intl,n=e.columnId,o=e.hasUnread,a=e.multiColumn,c=e.onlyMedia,i=!!n;return u.a.createElement(O.a,{ref:this.setRef,name:"federated",label:t.formatMessage(C.title)},Object(l.a)(f.a,{icon:"globe",active:o,title:t.formatMessage(C.title),onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:i,multiColumn:a},void 0,Object(l.a)(I,{columnId:n})),Object(l.a)(j.a,{timelineId:"public"+(c?":media":""),onLoadMore:this.handleLoadMore,trackScroll:!i,scrollKey:"public_timeline-"+n,emptyMessage:Object(l.a)(p.b,{id:"empty_column.public",defaultMessage:"There is nothing here! Write something publicly, or manually follow users from other servers to fill it up"})}))},e}(u.a.PureComponent),Object(d.a)(a,"defaultProps",{onlyMedia:!1}),Object(d.a)(a,"contextTypes",{router:m.a.object}),o=c))||o)||o}}]);
2018-09-16 15:17:34 -06:00
//# sourceMappingURL=public_timeline.js.map