-
Notifications
You must be signed in to change notification settings - Fork 414
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add option to pass in url-search params. Impetus: allow linked comment ID and setting the discussion tab when clicking on the `ClaimPreview`. * comment.list: fix typos and renamed variables - Switch from 'author' to 'creator' to disambiguate between comment author and content author. For comment author, we'll use 'commenter' from now on. - Corrected 'commenterClaimId' to 'creatorClaimId' (just a typo, no functional change). * doCommentReset: change param from uri to claimId This reduces one lookup as clients will always have the claimID ready, but might not have the full URI. It was using URI previously just to match the other APIs. * Add doCommentListOwn -- command to fetch own comments Since the redux slice is set up based on content or channel ID (for Channel Discussion page), re-use the channel ID for the case of "own comments". We always clear each ID when fetching page-0, so no worries of conflict when actually browsing the Channel Discussion page. * Comment: add option to hide the actions section * Implement own-comments page * Use new param to remove sort-pins-first. comment.List currently always pushes pins to the top to support pagination. This new param removes this behavior.
- Loading branch information
1 parent
d3be872
commit de6c6f9
Showing
17 changed files
with
472 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { connect } from 'react-redux'; | ||
import { doCommentListOwn, doCommentReset } from 'redux/actions/comments'; | ||
import { selectActiveChannelClaim } from 'redux/selectors/app'; | ||
import { | ||
selectIsFetchingComments, | ||
makeSelectCommentsForUri, | ||
makeSelectTotalCommentsCountForUri, | ||
makeSelectTopLevelTotalPagesForUri, | ||
} from 'redux/selectors/comments'; | ||
import { selectClaimsById } from 'lbry-redux'; | ||
|
||
import OwnComments from './view'; | ||
|
||
const select = (state) => { | ||
const activeChannelClaim = selectActiveChannelClaim(state); | ||
const uri = activeChannelClaim && activeChannelClaim.canonical_url; | ||
|
||
return { | ||
activeChannelClaim, | ||
allComments: makeSelectCommentsForUri(uri)(state), | ||
totalComments: makeSelectTotalCommentsCountForUri(uri)(state), | ||
topLevelTotalPages: makeSelectTopLevelTotalPagesForUri(uri)(state), | ||
isFetchingComments: selectIsFetchingComments(state), | ||
claimsById: selectClaimsById(state), | ||
}; | ||
}; | ||
|
||
const perform = (dispatch) => ({ | ||
doCommentReset: (a) => dispatch(doCommentReset(a)), | ||
doCommentListOwn: (a, b, c) => dispatch(doCommentListOwn(a, b, c)), | ||
}); | ||
|
||
export default connect(select, perform)(OwnComments); |
Oops, something went wrong.