Skip to content

Commit

Permalink
Merge pull request #30 from intern0t/message-received-scroll-to-bottom
Browse files Browse the repository at this point in the history
Code cleanups, new scroll to bottom enhancemant added, removed the ol…
  • Loading branch information
intern0t committed Jan 13, 2019
2 parents 10eac4b + d45e9f8 commit 0d15168
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
9 changes: 0 additions & 9 deletions src/components/pages/Conversation.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,8 @@ class Conversation extends Component {
) {
changeActiveRoom(match.params.roomid || "r-general");
}
// this.scrollToBottom();
}

scrollToBottom = () => {
const conversationWindow = document.getElementById(
"conversation-window"
);
conversationWindow.scrollTop = conversationWindow.scrollHeight;
};

toggleConversationSettingsModal = () => {
this.setState(prevState => ({
...prevState,
Expand Down Expand Up @@ -119,7 +111,6 @@ class Conversation extends Component {
}));
}
}
// this.scrollToBottom();
};

onKeyVisibilityHandle = e => {
Expand Down
4 changes: 0 additions & 4 deletions src/contexts/ConversationProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,6 @@ export class ConversationProvider extends Component {
this.scrollToMyRef();
};

scrollToBottom = node => {
node.scrollTop = node.scrollHeight;
};

toggleConversationSettingsModal = e => {
e.preventDefault();
this.setState(prevState => ({
Expand Down

0 comments on commit 0d15168

Please sign in to comment.