mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
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
@ -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 New Issue
Block a user