-(window.webpackJsonp=window.webpackJsonp||[]).push([[25],{731:function(e,n,t){"use strict";t.r(n),t.d(n,"default",function(){return w});var o,i=t(0),c=t.n(i),a=t(6),r=t.n(a),l=t(3),s=t.n(l),d=t(7),u=t.n(d),p=t(1),h=t.n(p),m=t(12),f=t(88),b=t(62),v=t(60),M=t(19),g=t(113),y=t(4),j=t(63),O=Object(y.f)({title:{id:"column.direct",defaultMessage:"Direct messages"}}),w=Object(m.connect)(function(e){return{hasUnread:e.getIn(["timelines","direct","unread"])>0}})(o=Object(y.g)(o=function(e){function n(){var t,o,i;r()(this,n);for(var c=arguments.length,a=Array(c),l=0;l<c;l++)a[l]=arguments[l];return t=o=s()(this,e.call.apply(e,[this].concat(a))),o.handlePin=function(){var e=o.props,n=e.columnId,t=e.dispatch;t(n?Object(g.h)(n):Object(g.e)("DIRECT",{}))},o.handleMove=function(e){var n=o.props,t=n.columnId;(0,n.dispatch)(Object(g.g)(t,e))},o.handleHeaderClick=function(){o.column.scrollTop()},o.setRef=function(e){o.column=e},o.handleLoadMore=function(e){o.props.dispatch(Object(M.n)({maxId:e}))},i=t,s()(o,i)}return u()(n,e),n.prototype.componentDidMount=function(){var e=this.props.dispatch;e(Object(M.n)()),this.disconnect=e(Object(j.b)())},n.prototype.componentWillUnmount=function(){this.disconnect&&(this.disconnect(),this.disconnect=null)},n.prototype.render=function(){var e=this.props,n=e.intl,t=e.shouldUpdateScroll,o=e.hasUnread,i=e.columnId,a=e.multiColumn,r=!!i;return h.a.createElement(b.a,{ref:this.setRef,label:n.formatMessage(O.title)},c()(v.a,{icon:"envelope",active:o,title:n.formatMessage(O.title),onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:r,multiColumn:a}),c()(f.a,{trackScroll:!r,scrollKey:"direct_timeline-"+i,timelineId:"direct",onLoadMore:this.handleLoadMore,emptyMessage:c()(y.b,{id:"empty_column.direct",defaultMessage:"You don't have any direct messages yet. When you send or receive one, it will show up here."}),shouldUpdateScroll:t}))},n}(h.a.PureComponent))||o)||o}}]);
+(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{695:function(e,t,n){"use strict";n.r(t);var i=n(0),c=n(2),r=n(6),s=n(1),o=n(3),u=n.n(o),a=n(21),d=n(633),l=n(628),p=n(102),h=n(222),b=n(7),f=n(635),v=n(43),j=n(68),O=n(56),M=n.n(O),g=n(5),m=n.n(g),y=n(26),I=n.n(y),w=n(25),k=n(903),C=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(s.a)(Object(c.a)(a),"handleClick",function(){if(a.context.router){var e=a.props,t=e.lastStatusId,n=e.unread,o=e.markRead;n&&o(),a.context.router.history.push("/statuses/"+t)}}),Object(s.a)(Object(c.a)(a),"handleHotkeyMoveUp",function(){a.props.onMoveUp(a.props.conversationId)}),Object(s.a)(Object(c.a)(a),"handleHotkeyMoveDown",function(){a.props.onMoveDown(a.props.conversationId)}),a}return Object(r.a)(e,o),e.prototype.render=function(){var e=this.props,t=e.accounts,n=e.lastStatusId,o=e.unread;return null===n?null:Object(i.a)(k.a,{id:n,unread:o,otherAccounts:t,onMoveUp:this.handleHotkeyMoveUp,onMoveDown:this.handleHotkeyMoveDown,onClick:this.handleClick})},e}(w.a);Object(s.a)(C,"contextTypes",{router:m.a.object}),Object(s.a)(C,"propTypes",{conversationId:m.a.string.isRequired,accounts:I.a.list.isRequired,lastStatusId:m.a.string,unread:m.a.bool.isRequired,onMoveUp:m.a.func,onMoveDown:m.a.func,markRead:m.a.func.isRequired});var L=Object(a.connect)(function(t,e){var n=e.conversationId,o=t.getIn(["conversations","items"]).find(function(e){return e.get("id")===n});return{accounts:o.get("accounts").map(function(e){return t.getIn(["accounts",e],null)}),unread:o.get("unread"),lastStatusId:o.get("last_status",null)}},function(e,t){var n=t.conversationId;return{markRead:function(){return e(Object(p.i)(n))}}})(C),R=n(893),U=function(a){function e(){for(var n,e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return n=a.call.apply(a,[this].concat(t))||this,Object(s.a)(Object(c.a)(n),"getCurrentIndex",function(t){return n.props.conversations.findIndex(function(e){return e.get("id")===t})}),Object(s.a)(Object(c.a)(n),"handleMoveUp",function(e){var t=n.getCurrentIndex(e)-1;n._selectChild(t)}),Object(s.a)(Object(c.a)(n),"handleMoveDown",function(e){var t=n.getCurrentIndex(e)+1;n._selectChild(t)}),Object(s.a)(Object(c.a)(n),"setRef",function(e){n.node=e}),Object(s.a)(Object(c.a)(n),"handleLoadOlder",M()(function(){var e=n.props.conversations.last();e&&e.get("last_status")&&n.props.onLoadMore(e.get("last_status"))},300,{leading:!0})),n}Object(r.a)(e,a);var t=e.prototype;return t._selectChild=function(e){var t=this.node.node.querySelector("article:nth-of-type("+(e+1)+") .focusable");t&&t.focus()},t.render=function(){var t=this,e=this.props,n=e.conversations,o=e.onLoadMore,a=Object(j.a)(e,["conversations","onLoadMore"]);return u.a.createElement(R.a,Object(v.a)({},a,{onLoadMore:o&&this.handleLoadOlder,scrollKey:"direct",ref:this.setRef}),n.map(function(e){return Object(i.a)(L,{conversationId:e.get("id"),onMoveUp:t.handleMoveUp,onMoveDown:t.handleMoveDown},e.get("id"))}))},e}(w.a);Object(s.a)(U,"propTypes",{conversations:I.a.list.isRequired,hasMore:m.a.bool,isLoading:m.a.bool,onLoadMore:m.a.func,shouldUpdateScroll:m.a.func});var D,x=Object(a.connect)(function(e){return{conversations:e.getIn(["conversations","items"]),isLoading:e.getIn(["conversations","isLoading"],!0),hasMore:e.getIn(["conversations","hasMore"],!1)}},function(t){return{onLoadMore:function(e){return t(Object(p.h)({maxId:e}))}}})(U);n.d(t,"default",function(){return _});var S=Object(b.f)({title:{id:"column.direct",defaultMessage:"Direct messages"}}),_=Object(a.connect)()(D=Object(b.g)(D=function(a){function e(){for(var o,e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o=a.call.apply(a,[this].concat(t))||this,Object(s.a)(Object(c.a)(o),"handlePin",function(){var e=o.props,t=e.columnId,n=e.dispatch;n(t?Object(h.h)(t):Object(h.e)("DIRECT",{}))}),Object(s.a)(Object(c.a)(o),"handleMove",function(e){var t=o.props,n=t.columnId;(0,t.dispatch)(Object(h.g)(n,e))}),Object(s.a)(Object(c.a)(o),"handleHeaderClick",function(){o.column.scrollTop()}),Object(s.a)(Object(c.a)(o),"setRef",function(e){o.column=e}),Object(s.a)(Object(c.a)(o),"handleLoadMore",function(e){o.props.dispatch(Object(p.h)({maxId:e}))}),o}Object(r.a)(e,a);var t=e.prototype;return t.componentDidMount=function(){var e=this.props.dispatch;e(Object(p.j)()),e(Object(p.h)()),this.disconnect=e(Object(f.b)())},t.componentWillUnmount=function(){this.props.dispatch(Object(p.k)()),this.disconnect&&(this.disconnect(),this.disconnect=null)},t.render=function(){var e=this.props,t=e.intl,n=e.hasUnread,o=e.columnId,a=e.multiColumn,c=e.shouldUpdateScroll,r=!!o;return u.a.createElement(d.a,{ref:this.setRef,label:t.formatMessage(S.title)},Object(i.a)(l.a,{icon:"envelope",active:n,title:t.formatMessage(S.title),onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:r,multiColumn:a}),Object(i.a)(x,{trackScroll:!r,scrollKey:"direct_timeline-"+o,timelineId:"direct",onLoadMore:this.handleLoadMore,emptyMessage:Object(i.a)(b.b,{id:"empty_column.direct",defaultMessage:"You don't have any direct messages yet. When you send or receive one, it will show up here."}),shouldUpdateScroll:c}))},e}(u.a.PureComponent))||D)||D}}]);
//# sourceMappingURL=direct_timeline.js.map
\ No newline at end of file