]> Untitled Git - lemmy.git/commitdiff
Fixing some community sorting.
authorDessalines <tyhou13@gmx.com>
Thu, 18 Apr 2019 15:28:24 +0000 (08:28 -0700)
committerDessalines <tyhou13@gmx.com>
Thu, 18 Apr 2019 15:28:24 +0000 (08:28 -0700)
server/src/websocket_server/server.rs
ui/src/components/communities.tsx
ui/src/components/main.tsx
ui/src/components/post-form.tsx

index 76721b58654fb549f3691120f0afa82b9b358125..a4c5b62037e15cebfc8ce19705576200df8c2f19 100644 (file)
@@ -876,7 +876,7 @@ impl Perform for ListCommunities {
 
     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
     serde_json::to_string(
index a78e43a7dc1886d84f476326feb2feec6283fe35..868006844960f51b99585f8cbf3078d2dd0b4155 100644 (file)
@@ -32,7 +32,8 @@ export class Communities extends Component<any, CommunitiesState> {
     );
 
     let listCommunitiesForm: ListCommunitiesForm = {
-      sort: SortType[SortType.TopAll]
+      sort: SortType[SortType.TopAll],
+      limit: 9999,
     }
 
     WebSocketService.Instance.listCommunities(listCommunitiesForm);
index 2badb23ea85a7c90915be3822aeb408b1d92eb18..0b5923c080b75ea7232400029136ea258e61ffc0 100644 (file)
@@ -59,7 +59,7 @@ export class Main extends Component<any, State> {
 
     let listCommunitiesForm: ListCommunitiesForm = {
       sort: SortType[SortType.New],
-      limit: 8
+      limit: 6
     }
 
     WebSocketService.Instance.listCommunities(listCommunitiesForm);
index 4627ab48c535661c7004ecef2c1175522d420b66..bec73812e2ca4dd6a8227bf1290426b9102691fd 100644 (file)
@@ -59,7 +59,8 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
       );
 
       let listCommunitiesForm: ListCommunitiesForm = {
-        sort: SortType[SortType.TopAll]
+        sort: SortType[SortType.TopAll],
+        limit: 9999,
       }
 
       WebSocketService.Instance.listCommunities(listCommunitiesForm);