Comment Tree paging (#726)
* Updating translations. * Forgot to add comment-sort-select * Upgrading deps
This commit is contained in:
parent
49ceb00dc8
commit
69b623b8fb
19 changed files with 652 additions and 443 deletions
|
@ -29,7 +29,11 @@ import {
|
|||
} from "lemmy-js-client";
|
||||
import { Subscription } from "rxjs";
|
||||
import { i18n } from "../../i18next";
|
||||
import { DataType, InitialFetchRequest } from "../../interfaces";
|
||||
import {
|
||||
CommentViewType,
|
||||
DataType,
|
||||
InitialFetchRequest,
|
||||
} from "../../interfaces";
|
||||
import { UserService, WebSocketService } from "../../services";
|
||||
import {
|
||||
auth,
|
||||
|
@ -46,6 +50,7 @@ import {
|
|||
getPageFromProps,
|
||||
getSortTypeFromProps,
|
||||
notifyPost,
|
||||
postToCommentSortType,
|
||||
relTags,
|
||||
restoreScrollPosition,
|
||||
saveCommentRes,
|
||||
|
@ -233,9 +238,12 @@ export class Community extends Component<any, State> {
|
|||
community_id: None,
|
||||
page,
|
||||
limit: Some(fetchLimit),
|
||||
sort,
|
||||
max_depth: None,
|
||||
sort: sort.map(postToCommentSortType),
|
||||
type_: Some(ListingType.All),
|
||||
saved_only: Some(false),
|
||||
post_id: None,
|
||||
parent_id: None,
|
||||
auth: req.auth,
|
||||
});
|
||||
promises.push(Promise.resolve());
|
||||
|
@ -389,6 +397,7 @@ export class Community extends Component<any, State> {
|
|||
) : (
|
||||
<CommentNodes
|
||||
nodes={commentsToFlatNodes(this.state.comments)}
|
||||
viewType={CommentViewType.Flat}
|
||||
noIndent
|
||||
showContext
|
||||
enableDownvotes={enableDownvotes(this.state.siteRes)}
|
||||
|
@ -499,11 +508,14 @@ export class Community extends Component<any, State> {
|
|||
let form = new GetComments({
|
||||
page: Some(this.state.page),
|
||||
limit: Some(fetchLimit),
|
||||
sort: Some(this.state.sort),
|
||||
max_depth: None,
|
||||
sort: Some(postToCommentSortType(this.state.sort)),
|
||||
type_: Some(ListingType.All),
|
||||
community_name: Some(this.state.communityName),
|
||||
community_id: None,
|
||||
saved_only: Some(false),
|
||||
post_id: None,
|
||||
parent_id: None,
|
||||
auth: auth(false).ok(),
|
||||
});
|
||||
WebSocketService.Instance.send(wsClient.getComments(form));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue