Skip to content

Commit

Permalink
feat: 🎸 no scroll to bottom on new messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Spielmann committed Dec 4, 2020
1 parent dd28b6e commit 939c7fe
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/button/button.styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ $buttonBoxShadow: 0 6px 0 0 rgba(0, 0, 0, 0.1);
min-width: auto;
padding: 0;
background-color: $light-grey;
box-shadow: $buttonBoxShadow;
box-shadow: 0 3px 0 0 rgba(0, 0, 0, 0.1);
transition: all 0.6s ease;
opacity: 1;

Expand Down
1 change: 0 additions & 1 deletion src/components/session/SessionItemComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ export const SessionItemComponent = (props: SessionItemProps) => {
placeholder={getPlaceholder()}
showMonitoringButton={() => {
setMonitoringButtonVisible(true);
scrollToEnd(0, true);
}}
type={getTypeOfLocation()}
typingUsers={props.typingUsers}
Expand Down
4 changes: 1 addition & 3 deletions src/components/session/SessionView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ import {
getSessionListPathForLocation,
getChatItemForSession,
isGroupChatForSessionItem,
prepareMessages,
scrollToEnd
prepareMessages
} from './sessionHelpers';
import { rocketChatSocket } from '../apiWrapper';
import { JoinGroupChatView } from '../groupChat/JoinGroupChatView';
Expand Down Expand Up @@ -185,7 +184,6 @@ export const SessionView = (props) => {
setLoadedMessages(messagesData);
setIsLoading(false);
}
scrollToEnd(0, true);

if (!isSocketConnected) {
setSessionToRead();
Expand Down

0 comments on commit 939c7fe

Please sign in to comment.