Fixing some community sorting.

pull/722/head
Dessalines 2019-04-18 08:28:24 -07:00
parent 2b7cc36318
commit 4ce0d2576c
4 changed files with 6 additions and 4 deletions

View File

@ -876,7 +876,7 @@ impl Perform for ListCommunities {
let sort = SortType::from_str(&self.sort).expect("listing sort"); let sort = SortType::from_str(&self.sort).expect("listing sort");
let communities: Vec<CommunityView> = CommunityView::list(&conn, user_id, sort, self.page, Some(9999)).unwrap(); let communities: Vec<CommunityView> = CommunityView::list(&conn, user_id, sort, self.page, self.limit).unwrap();
// Return the jwt // Return the jwt
serde_json::to_string( serde_json::to_string(

View File

@ -32,7 +32,8 @@ export class Communities extends Component<any, CommunitiesState> {
); );
let listCommunitiesForm: ListCommunitiesForm = { let listCommunitiesForm: ListCommunitiesForm = {
sort: SortType[SortType.TopAll] sort: SortType[SortType.TopAll],
limit: 9999,
} }
WebSocketService.Instance.listCommunities(listCommunitiesForm); WebSocketService.Instance.listCommunities(listCommunitiesForm);

View File

@ -59,7 +59,7 @@ export class Main extends Component<any, State> {
let listCommunitiesForm: ListCommunitiesForm = { let listCommunitiesForm: ListCommunitiesForm = {
sort: SortType[SortType.New], sort: SortType[SortType.New],
limit: 8 limit: 6
} }
WebSocketService.Instance.listCommunities(listCommunitiesForm); WebSocketService.Instance.listCommunities(listCommunitiesForm);

View File

@ -59,7 +59,8 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
); );
let listCommunitiesForm: ListCommunitiesForm = { let listCommunitiesForm: ListCommunitiesForm = {
sort: SortType[SortType.TopAll] sort: SortType[SortType.TopAll],
limit: 9999,
} }
WebSocketService.Instance.listCommunities(listCommunitiesForm); WebSocketService.Instance.listCommunities(listCommunitiesForm);