re-arrange method order to group statics before instance methods
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
c00c52e537
commit
4021fc049c
1 changed files with 35 additions and 35 deletions
|
@ -59,28 +59,6 @@ export default class ReplyThread extends React.Component {
|
||||||
this.collapse = this.collapse.bind(this);
|
this.collapse = this.collapse.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillMount() {
|
|
||||||
this.unmounted = false;
|
|
||||||
this.room = this.context.matrixClient.getRoom(this.props.parentEv.getRoomId());
|
|
||||||
this.initialize();
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidUpdate() {
|
|
||||||
this.props.onWidgetLoad();
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillUnmount() {
|
|
||||||
this.unmounted = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
canCollapse() {
|
|
||||||
return this.state.events.length > 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
collapse() {
|
|
||||||
this.initialize();
|
|
||||||
}
|
|
||||||
|
|
||||||
async initialize() {
|
async initialize() {
|
||||||
const {parentEv} = this.props;
|
const {parentEv} = this.props;
|
||||||
// at time of making this component we checked that props.parentEv has a parentEventId
|
// at time of making this component we checked that props.parentEv has a parentEventId
|
||||||
|
@ -134,17 +112,6 @@ export default class ReplyThread extends React.Component {
|
||||||
return room.findEventById(eventId);
|
return room.findEventById(eventId);
|
||||||
}
|
}
|
||||||
|
|
||||||
onQuoteClick() {
|
|
||||||
const events = [this.state.loadedEv, ...this.state.events];
|
|
||||||
|
|
||||||
this.setState({
|
|
||||||
loadedEv: null,
|
|
||||||
events,
|
|
||||||
}, this.loadNextEvent);
|
|
||||||
|
|
||||||
dis.dispatch({action: 'focus_composer'});
|
|
||||||
}
|
|
||||||
|
|
||||||
static getParentEventId(ev) {
|
static getParentEventId(ev) {
|
||||||
if (!ev || ev.isRedacted()) return;
|
if (!ev || ev.isRedacted()) return;
|
||||||
|
|
||||||
|
@ -252,6 +219,39 @@ export default class ReplyThread extends React.Component {
|
||||||
return <ReplyThread parentEv={parentEv} onWidgetLoad={onWidgetLoad} ref={ref} />;
|
return <ReplyThread parentEv={parentEv} onWidgetLoad={onWidgetLoad} ref={ref} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentWillMount() {
|
||||||
|
this.unmounted = false;
|
||||||
|
this.room = this.context.matrixClient.getRoom(this.props.parentEv.getRoomId());
|
||||||
|
this.initialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidUpdate() {
|
||||||
|
this.props.onWidgetLoad();
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
this.unmounted = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
canCollapse() {
|
||||||
|
return this.state.events.length > 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
collapse() {
|
||||||
|
this.initialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
onQuoteClick() {
|
||||||
|
const events = [this.state.loadedEv, ...this.state.events];
|
||||||
|
|
||||||
|
this.setState({
|
||||||
|
loadedEv: null,
|
||||||
|
events,
|
||||||
|
}, this.loadNextEvent);
|
||||||
|
|
||||||
|
dis.dispatch({action: 'focus_composer'});
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let header = null;
|
let header = null;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue