} 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,
getSortTypeFromProps,
isBrowser,
notifyPost,
+ postToCommentSortType,
relTags,
restoreScrollPosition,
saveCommentRes,
community_name: None,
page,
limit: Some(fetchLimit),
- sort,
+ max_depth: None,
+ sort: sort.map(postToCommentSortType),
type_,
saved_only: Some(false),
+ post_id: None,
+ parent_id: None,
auth: req.auth,
});
promises.push(Promise.resolve());
) : (
<CommentNodes
nodes={commentsToFlatNodes(this.state.comments)}
+ viewType={CommentViewType.Flat}
moderators={None}
admins={None}
maxCommentsShown={None}
community_name: None,
page: Some(this.state.page),
limit: Some(fetchLimit),
- sort: Some(this.state.sort),
+ max_depth: None,
+ sort: Some(postToCommentSortType(this.state.sort)),
saved_only: Some(false),
+ post_id: None,
+ parent_id: None,
auth: auth(false).ok(),
type_: Some(this.state.listingType),
});