import React from 'react';
import { Actions, ReactDOM } from 'mailspring-exports';
import { RetinaImg } from 'mailspring-component-kit';
import ActivityList from './activity-list';
import ActivityEventStore from '../activity-event-store';
class ActivityListButton extends React.Component {
static displayName = 'ActivityListButton';
constructor() {
super();
this.state = this._getStateFromStores();
}
componentDidMount() {
this._unsub = ActivityEventStore.listen(this._onDataChanged);
}
componentWillUnmount() {
this._unsub();
}
onClick = () => {
const buttonRect = ReactDOM.findDOMNode(this).getBoundingClientRect();
Actions.openPopover(