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

2 lines
3.3 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[72],{728:function(e,t,n){"use strict";n.r(t);var o,a,c,l=n(1),i=n(6),d=n(0),r=n(2),s=n(3),u=n.n(s),b=n(20),p=n(7),h=n(5),m=n.n(h),j=n(625),O=n(429),f=n(427),M=n(31),g=n(202),y=n(950),v=n(82),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(400);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(r.a)(Object(d.a)(Object(d.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(r.a)(Object(d.a)(Object(d.a)(a)),"handleMove",function(e){var t=a.props,n=t.columnId;(0,t.dispatch)(Object(g.g)(n,e))}),Object(r.a)(Object(d.a)(Object(d.a)(a)),"handleHeaderClick",function(){a.column.scrollTop()}),Object(r.a)(Object(d.a)(Object(d.a)(a)),"setRef",function(e){a.column=e}),Object(r.a)(Object(d.a)(Object(d.a)(a)),"handleLoadMore",function(e){var t=a.props,n=t.dispatch,o=t.onlyMedia;n(Object(M.t)({maxId:e,onlyMedia:o}))}),Object(r.a)(Object(d.a)(Object(d.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 instances to fill it up"})}))},e}(u.a.PureComponent),Object(r.a)(a,"defaultProps",{onlyMedia:!1}),Object(r.a)(a,"contextTypes",{router:m.a.object}),o=c))||o)||o}}]);
//# sourceMappingURL=public_timeline.js.map