diff options
author | Dessalines <tyhou13@gmx.com> | 2019-10-20 21:21:54 -0700 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2019-10-20 21:21:54 -0700 |
commit | 90ce1f1a3fca5c8d8a13e91f991b23ecb77f1faf (patch) | |
tree | cd851bbdb333f3b16cfd0f5aaeed97e6f46af143 /ui/src/components/community.tsx | |
parent | a7dedaf273b6fd2ebd9c9b8b9d6a7d227f376797 (diff) |
Adding default sort / filter into user settings.
- Fixes #295
Diffstat (limited to 'ui/src/components/community.tsx')
-rw-r--r-- | ui/src/components/community.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/src/components/community.tsx b/ui/src/components/community.tsx index efeaa1b3..8f36178c 100644 --- a/ui/src/components/community.tsx +++ b/ui/src/components/community.tsx @@ -15,7 +15,7 @@ import { GetPostsResponse, CreatePostLikeResponse, } from '../interfaces'; -import { WebSocketService } from '../services'; +import { WebSocketService, UserService } from '../services'; import { PostListings } from './post-listings'; import { SortSelect } from './sort-select'; import { Sidebar } from './sidebar'; @@ -72,6 +72,8 @@ export class Community extends Component<any, State> { getSortTypeFromProps(props: any): SortType { return props.match.params.sort ? routeSortTypeToEnum(props.match.params.sort) + : UserService.Instance.user + ? UserService.Instance.user.default_sort_type : SortType.Hot; } |