summaryrefslogtreecommitdiffstats
path: root/ui/src/components/main.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-02-09 11:44:24 -0500
committerDessalines <tyhou13@gmx.com>2020-02-09 11:44:24 -0500
commitfd8814677ec81eff5358c102b6b424ec1c23c2fb (patch)
treeb715aedaf6b06ccf6bcbb10c099c2d794b2c819c /ui/src/components/main.tsx
parent56cd103209605471b27aa5a854cc3b051f2a65f5 (diff)
Live post and comment resorting. Fixes #522
- Moving sorting to utils.
Diffstat (limited to 'ui/src/components/main.tsx')
-rw-r--r--ui/src/components/main.tsx9
1 files changed, 8 insertions, 1 deletions
diff --git a/ui/src/components/main.tsx b/ui/src/components/main.tsx
index 99b1618d..c8e132f7 100644
--- a/ui/src/components/main.tsx
+++ b/ui/src/components/main.tsx
@@ -51,6 +51,7 @@ import {
createPostLikeFindRes,
editPostFindRes,
commentsToFlatNodes,
+ commentSortSortType,
} from '../utils';
import { i18n } from '../i18next';
import { T } from 'inferno-i18next';
@@ -404,12 +405,18 @@ export class Main extends Component<any, MainState> {
listings() {
return this.state.dataType == DataType.Post ? (
- <PostListings posts={this.state.posts} showCommunity removeDuplicates />
+ <PostListings
+ posts={this.state.posts}
+ showCommunity
+ removeDuplicates
+ sort={this.state.sort}
+ />
) : (
<CommentNodes
nodes={commentsToFlatNodes(this.state.comments)}
noIndent
showCommunity
+ sortType={this.state.sort}
/>
);
}