From: Dessalines Date: Thu, 18 Apr 2019 15:28:24 +0000 (-0700) Subject: Fixing some community sorting. X-Git-Url: http://these/git/%22%7Burl%7D/static/%24%7BappleTouchIcon%7D?a=commitdiff_plain;h=4ce0d2576c0a2594f6b7b72462f450593220562e;p=lemmy.git Fixing some community sorting. --- diff --git a/server/src/websocket_server/server.rs b/server/src/websocket_server/server.rs index 76721b58..a4c5b620 100644 --- a/server/src/websocket_server/server.rs +++ b/server/src/websocket_server/server.rs @@ -876,7 +876,7 @@ impl Perform for ListCommunities { let sort = SortType::from_str(&self.sort).expect("listing sort"); - let communities: Vec = CommunityView::list(&conn, user_id, sort, self.page, Some(9999)).unwrap(); + let communities: Vec = CommunityView::list(&conn, user_id, sort, self.page, self.limit).unwrap(); // Return the jwt serde_json::to_string( diff --git a/ui/src/components/communities.tsx b/ui/src/components/communities.tsx index a78e43a7..86800684 100644 --- a/ui/src/components/communities.tsx +++ b/ui/src/components/communities.tsx @@ -32,7 +32,8 @@ export class Communities extends Component { ); let listCommunitiesForm: ListCommunitiesForm = { - sort: SortType[SortType.TopAll] + sort: SortType[SortType.TopAll], + limit: 9999, } WebSocketService.Instance.listCommunities(listCommunitiesForm); diff --git a/ui/src/components/main.tsx b/ui/src/components/main.tsx index 2badb23e..0b5923c0 100644 --- a/ui/src/components/main.tsx +++ b/ui/src/components/main.tsx @@ -59,7 +59,7 @@ export class Main extends Component { let listCommunitiesForm: ListCommunitiesForm = { sort: SortType[SortType.New], - limit: 8 + limit: 6 } WebSocketService.Instance.listCommunities(listCommunitiesForm); diff --git a/ui/src/components/post-form.tsx b/ui/src/components/post-form.tsx index 4627ab48..bec73812 100644 --- a/ui/src/components/post-form.tsx +++ b/ui/src/components/post-form.tsx @@ -59,7 +59,8 @@ export class PostForm extends Component { ); let listCommunitiesForm: ListCommunitiesForm = { - sort: SortType[SortType.TopAll] + sort: SortType[SortType.TopAll], + limit: 9999, } WebSocketService.Instance.listCommunities(listCommunitiesForm);