From: Dessalines Date: Fri, 26 Apr 2019 05:50:42 +0000 (-0700) Subject: Spamtimer X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/readmes/%7B%7D/static/%7Bthis.props.icon%7D?a=commitdiff_plain;h=fba4d372fcc175f1da53b72980c97e09fdb77d9c;p=lemmy.git Spamtimer --- diff --git a/server/src/websocket_server/server.rs b/server/src/websocket_server/server.rs index c99b32a6..dbd1be8d 100644 --- a/server/src/websocket_server/server.rs +++ b/server/src/websocket_server/server.rs @@ -969,7 +969,7 @@ impl Perform for ListCommunities { let sort = SortType::from_str(&self.sort)?; - let communities: Vec = CommunityView::list(&conn, user_id, sort, self.page, Some(50))?; + let communities: Vec = CommunityView::list(&conn, user_id, sort, self.page, self.limit)?; // Return the jwt Ok( diff --git a/ui/src/components/communities.tsx b/ui/src/components/communities.tsx index 38344007..b5233c22 100644 --- a/ui/src/components/communities.tsx +++ b/ui/src/components/communities.tsx @@ -33,7 +33,7 @@ export class Communities extends Component { let listCommunitiesForm: ListCommunitiesForm = { sort: SortType[SortType.TopAll], - limit: 9999, + limit: 100, } WebSocketService.Instance.listCommunities(listCommunitiesForm); diff --git a/ui/src/components/login.tsx b/ui/src/components/login.tsx index 2a9f8d7d..e6dec2d2 100644 --- a/ui/src/components/login.tsx +++ b/ui/src/components/login.tsx @@ -10,6 +10,7 @@ interface State { registerForm: RegisterForm; loginLoading: boolean; registerLoading: boolean; + spamTimer: number; } @@ -28,7 +29,8 @@ export class Login extends Component { admin: false, }, loginLoading: false, - registerLoading: false + registerLoading: false, + spamTimer: new Date().getTime() } constructor(props: any, context: any) { @@ -124,6 +126,7 @@ export class Login extends Component { +