fix linting issues in ScrollPanel

This commit is contained in:
Germain Souquet 2021-04-09 11:17:50 +01:00
parent ef1da6acdd
commit d450822bfd

View file

@ -539,24 +539,24 @@ export default class ScrollPanel extends React.Component {
* @param {object} ev the keyboard event * @param {object} ev the keyboard event
*/ */
handleScrollKey = ev => { handleScrollKey = ev => {
let isScrolling = false; let isScrolling = false;
const roomAction = getKeyBindingsManager().getRoomAction(ev); const roomAction = getKeyBindingsManager().getRoomAction(ev);
switch (roomAction) { switch (roomAction) {
case RoomAction.ScrollUp: case RoomAction.ScrollUp:
this.scrollRelative(-1); this.scrollRelative(-1);
isScrolling = true; isScrolling = true;
break; break;
case RoomAction.RoomScrollDown: case RoomAction.RoomScrollDown:
this.scrollRelative(1); this.scrollRelative(1);
isScrolling = true; isScrolling = true;
break; break;
case RoomAction.JumpToFirstMessage: case RoomAction.JumpToFirstMessage:
this.scrollToTop(); this.scrollToTop();
isScrolling = true; isScrolling = true;
break; break;
case RoomAction.JumpToLatestMessage: case RoomAction.JumpToLatestMessage:
this.scrollToBottom(); this.scrollToBottom();
isScrolling = true; isScrolling = true;
break; break;
} }
if (isScrolling && this.props.onUserScroll) { if (isScrolling && this.props.onUserScroll) {