Skip to content

Commit 7e42072

Browse files
committed
Scroll to bottom when there are live call updates.
This keeps the latest messages visible when you place or receive a call.
1 parent e80cf8a commit 7e42072

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎src/controllers/organisms/RoomView.js‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,17 @@ module.exports = {
8989
case 'notifier_enabled':
9090
this.forceUpdate();
9191
break;
92+
case 'call_state':
93+
if (this.props.roomId !== payload.room_id) {
94+
break;
95+
}
96+
// scroll to bottom
97+
var messageWrapper = this.refs.messageWrapper;
98+
if (messageWrapper) {
99+
messageWrapper = messageWrapper.getDOMNode();
100+
messageWrapper.scrollTop = messageWrapper.scrollHeight;
101+
}
102+
break;
92103
}
93104
},
94105

0 commit comments

Comments
 (0)