Scroll to bottom when there are live call updates.
This keeps the latest messages visible when you place or receive a call.
This commit is contained in:
parent
e80cf8a133
commit
7e42072952
1 changed files with 11 additions and 0 deletions
|
@ -89,6 +89,17 @@ module.exports = {
|
||||||
case 'notifier_enabled':
|
case 'notifier_enabled':
|
||||||
this.forceUpdate();
|
this.forceUpdate();
|
||||||
break;
|
break;
|
||||||
|
case 'call_state':
|
||||||
|
if (this.props.roomId !== payload.room_id) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// scroll to bottom
|
||||||
|
var messageWrapper = this.refs.messageWrapper;
|
||||||
|
if (messageWrapper) {
|
||||||
|
messageWrapper = messageWrapper.getDOMNode();
|
||||||
|
messageWrapper.scrollTop = messageWrapper.scrollHeight;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue