]> Untitled Git - lemmy-ui.git/commitdiff
Make sure trending is local only. Fixes #142
authorDessalines <tyhou13@gmx.com>
Tue, 26 Jan 2021 15:59:38 +0000 (10:59 -0500)
committerDessalines <tyhou13@gmx.com>
Tue, 26 Jan 2021 15:59:38 +0000 (10:59 -0500)
package.json
src/shared/components/communities.tsx
src/shared/components/create-post.tsx
src/shared/components/main.tsx
yarn.lock

index 137d179ec644a69ec105a12d06ecda21199eeafd..a52c025115c26ed4fcb4aa5a07a302fe65d87a8d 100644 (file)
@@ -67,7 +67,7 @@
     "eslint": "^7.18.0",
     "eslint-plugin-jane": "^9.0.6",
     "husky": "^4.3.8",
-    "lemmy-js-client": "0.9.0",
+    "lemmy-js-client": "0.9.1-rc.1",
     "lint-staged": "^10.5.3",
     "mini-css-extract-plugin": "^1.3.4",
     "node-fetch": "^2.6.1",
index b3d288a840329f835b2fd7ca025d0685e86c16ff..74da2b116d3b4f4f6651bbc8e70243644a02dba0 100644 (file)
@@ -9,6 +9,7 @@ import {
   FollowCommunity,
   ListCommunities,
   SortType,
+  ListingType,
   SiteView,
 } from 'lemmy-js-client';
 import { WebSocketService } from '../services';
@@ -274,6 +275,7 @@ export class Communities extends Component<any, CommunitiesState> {
 
   refetch() {
     let listCommunitiesForm: ListCommunities = {
+      type_: ListingType.All,
       sort: SortType.TopAll,
       limit: communityLimit,
       page: this.state.page,
@@ -289,6 +291,7 @@ export class Communities extends Component<any, CommunitiesState> {
     let pathSplit = req.path.split('/');
     let page = pathSplit[3] ? Number(pathSplit[3]) : 1;
     let listCommunitiesForm: ListCommunities = {
+      type_: ListingType.All,
       sort: SortType.TopAll,
       limit: communityLimit,
       page,
index edb2f059c634146a444b005689144ff75f2cd6ad..2c0d9c125b3ffd526b54203a3916174d04eb60b2 100644 (file)
@@ -21,6 +21,7 @@ import {
   SiteView,
   ListCommunities,
   SortType,
+  ListingType,
   PostView,
 } from 'lemmy-js-client';
 import { i18n } from '../i18next';
@@ -65,6 +66,7 @@ export class CreatePost extends Component<any, CreatePostState> {
 
   refetch() {
     let listCommunitiesForm: ListCommunities = {
+      type_: ListingType.All,
       sort: SortType.TopAll,
       limit: 9999,
       auth: authField(false),
@@ -160,6 +162,7 @@ export class CreatePost extends Component<any, CreatePostState> {
 
   static fetchInitialData(req: InitialFetchRequest): Promise<any>[] {
     let listCommunitiesForm: ListCommunities = {
+      type_: ListingType.All,
       sort: SortType.TopAll,
       limit: 9999,
     };
index dbe013008188a32bac8d4bc9a195de752a2ebc22..11ac87bb0135ebbf5d3dcba4755092f6dd7ea7d7 100644 (file)
@@ -149,6 +149,7 @@ export class Main extends Component<any, MainState> {
 
   fetchTrendingCommunities() {
     let listCommunitiesForm: ListCommunities = {
+      type_: ListingType.Local,
       sort: SortType.Hot,
       limit: 6,
       auth: authField(false),
@@ -228,6 +229,7 @@ export class Main extends Component<any, MainState> {
     }
 
     let trendingCommunitiesForm: ListCommunities = {
+      type_: ListingType.Local,
       sort: SortType.Hot,
       limit: 6,
     };
index da1278b87469922730133a13cc242ee324b21631..fcc549bd360d58b617ad9a9bb090a9d6de7ad29e 100644 (file)
--- a/yarn.lock
+++ b/yarn.lock
@@ -5629,10 +5629,10 @@ lcid@^1.0.0:
   dependencies:
     invert-kv "^1.0.0"
 
-lemmy-js-client@0.9.0:
-  version "0.9.0"
-  resolved "https://registry.yarnpkg.com/lemmy-js-client/-/lemmy-js-client-0.9.0.tgz#952f06004d0f4517ca307a4e3424305731279584"
-  integrity sha512-VqupLyzZG/4IY9XyDE3ZmtGiw0tccz7wdbhOFutaOloVmo3XTUUuq5xheZK2jzdhNAGSqws0dnaeZcTHWsQGtA==
+lemmy-js-client@0.9.1-rc.1:
+  version "0.9.1-rc.1"
+  resolved "https://registry.yarnpkg.com/lemmy-js-client/-/lemmy-js-client-0.9.1-rc.1.tgz#afe3cb0d4852f849dd087a4756a3771bc920a907"
+  integrity sha512-aVvo4IeJvIPUvypipk4GnyLB6nVQVLfB0arYrMkVV4L7zrZ/0pGtpkMDLaOAj/KpA6O0u9eLmaou5RberZQolA==
 
 levn@^0.4.1:
   version "0.4.1"