Skip to content

Commit

Permalink
Improve scrolling behavior, fix tips sorting (#863)
Browse files Browse the repository at this point in the history
  • Loading branch information
rafael-xmr committed Feb 14, 2022
1 parent 5c5b46d commit ecc3599
Show file tree
Hide file tree
Showing 5 changed files with 163 additions and 132 deletions.
4 changes: 2 additions & 2 deletions ui/component/claimLink/view.jsx
Expand Up @@ -14,7 +14,7 @@ type Props = {
children: React.Node,
description: ?string,
isResolvingUri: boolean,
doResolveUri: (string) => void,
doResolveUri: (string, boolean) => void,
playingUri: ?PlayingUri,
parentCommentId?: string,
isMarkdownPost?: boolean,
Expand Down Expand Up @@ -43,7 +43,7 @@ class ClaimLink extends React.Component<Props> {
const { isResolvingUri, doResolveUri, claim, uri } = props;

if (!isResolvingUri && claim === undefined && uri) {
doResolveUri(uri);
doResolveUri(uri, true);
}
};

Expand Down
11 changes: 6 additions & 5 deletions ui/component/livestreamChatLayout/index.js
Expand Up @@ -6,27 +6,28 @@ import { doCommentList, doSuperChatList } from 'redux/actions/comments';
import {
selectTopLevelCommentsForUri,
selectSuperChatsForUri,
selectSuperChatTotalAmountForUri,
selectPinnedCommentsForUri,
} from 'redux/selectors/comments';
import { selectThemePath } from 'redux/selectors/settings';
import LivestreamChatLayout from './view';

const select = (state, props) => {
const { uri } = props;
const claim = selectClaimForUri(state, uri);

return {
claim: selectClaimForUri(state, uri),
claimId: claim && claim.claim_id,
comments: selectTopLevelCommentsForUri(state, uri, MAX_LIVESTREAM_COMMENTS),
pinnedComments: selectPinnedCommentsForUri(state, uri),
superChats: selectSuperChatsForUri(state, uri),
superChatsTotalAmount: selectSuperChatTotalAmountForUri(state, uri),
theme: selectThemePath(state),
};
};

export default connect(select, {
const perform = {
doCommentList,
doSuperChatList,
doResolveUris,
})(LivestreamChatLayout);
};

export default connect(select, perform)(LivestreamChatLayout);

0 comments on commit ecc3599

Please sign in to comment.