diff options
author | 2022-01-02 00:40:42 +0100 | |
---|---|---|
committer | 2022-01-02 00:40:42 +0100 | |
commit | 55dd67d28e691338b4ecbe928436c4f2a41ad5cb (patch) | |
tree | b73fa0fb7398673c936888f72c8027456bfb463f /src/containers/settings/RecipesScreen.js | |
parent | Revert "Removed 'Most Popular' services since it alludes to user-tracking (#1... (diff) | |
download | ferdium-app-55dd67d28e691338b4ecbe928436c4f2a41ad5cb.tar.gz ferdium-app-55dd67d28e691338b4ecbe928436c4f2a41ad5cb.tar.zst ferdium-app-55dd67d28e691338b4ecbe928436c4f2a41ad5cb.zip |
Revert "Removed straggling code related to popular services."
This reverts commit a9c1abc6f11cb193388fad505c0304f1efe60a30.
Diffstat (limited to 'src/containers/settings/RecipesScreen.js')
-rw-r--r-- | src/containers/settings/RecipesScreen.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/containers/settings/RecipesScreen.js b/src/containers/settings/RecipesScreen.js index b81336c12..e8f0a7282 100644 --- a/src/containers/settings/RecipesScreen.js +++ b/src/containers/settings/RecipesScreen.js | |||
@@ -54,6 +54,8 @@ class RecipesScreen extends Component { | |||
54 | 54 | ||
55 | if (filter === 'all' && currentFilter !== 'all') { | 55 | if (filter === 'all' && currentFilter !== 'all') { |
56 | this.setState({ currentFilter: 'all' }); | 56 | this.setState({ currentFilter: 'all' }); |
57 | } else if (filter === 'featured' && currentFilter !== 'featured') { | ||
58 | this.setState({ currentFilter: 'featured' }); | ||
57 | } else if (filter === 'dev' && currentFilter !== 'dev') { | 59 | } else if (filter === 'dev' && currentFilter !== 'dev') { |
58 | this.setState({ currentFilter: 'dev' }); | 60 | this.setState({ currentFilter: 'dev' }); |
59 | } | 61 | } |
@@ -113,7 +115,7 @@ class RecipesScreen extends Component { | |||
113 | 115 | ||
114 | const { app: appActions, service: serviceActions } = this.props.actions; | 116 | const { app: appActions, service: serviceActions } = this.props.actions; |
115 | 117 | ||
116 | const { filter } = { filter: 'all', ...this.props.params }; | 118 | const { filter } = this.props.params; |
117 | let recipeFilter; | 119 | let recipeFilter; |
118 | 120 | ||
119 | if (filter === 'all') { | 121 | if (filter === 'all') { |
@@ -123,6 +125,8 @@ class RecipesScreen extends Component { | |||
123 | ]); | 125 | ]); |
124 | } else if (filter === 'dev') { | 126 | } else if (filter === 'dev') { |
125 | recipeFilter = communityRecipesStore.communityRecipes; | 127 | recipeFilter = communityRecipesStore.communityRecipes; |
128 | } else { | ||
129 | recipeFilter = recipePreviews.featured; | ||
126 | } | 130 | } |
127 | recipeFilter = recipeFilter.sort(this._sortByName); | 131 | recipeFilter = recipeFilter.sort(this._sortByName); |
128 | 132 | ||
@@ -149,10 +153,10 @@ class RecipesScreen extends Component { | |||
149 | service => service.id === CUSTOM_WEBSITE_RECIPE_ID, | 153 | service => service.id === CUSTOM_WEBSITE_RECIPE_ID, |
150 | ); | 154 | ); |
151 | 155 | ||
152 | const isLoading = | 156 | const isLoading = recipePreviews.featuredRecipePreviewsRequest.isExecuting |
153 | recipePreviews.allRecipePreviewsRequest.isExecuting || | 157 | || recipePreviews.allRecipePreviewsRequest.isExecuting |
154 | recipes.installRecipeRequest.isExecuting || | 158 | || recipes.installRecipeRequest.isExecuting |
155 | recipePreviews.searchRecipePreviewsRequest.isExecuting; | 159 | || recipePreviews.searchRecipePreviewsRequest.isExecuting; |
156 | 160 | ||
157 | const recipeDirectory = userDataRecipesPath('dev'); | 161 | const recipeDirectory = userDataRecipesPath('dev'); |
158 | 162 | ||
@@ -163,6 +167,7 @@ class RecipesScreen extends Component { | |||
163 | customWebsiteRecipe={customWebsiteRecipe} | 167 | customWebsiteRecipe={customWebsiteRecipe} |
164 | isLoading={isLoading} | 168 | isLoading={isLoading} |
165 | addedServiceCount={services.all.length} | 169 | addedServiceCount={services.all.length} |
170 | hasLoadedRecipes={recipePreviews.featuredRecipePreviewsRequest.wasExecuted} | ||
166 | showAddServiceInterface={serviceActions.showAddServiceInterface} | 171 | showAddServiceInterface={serviceActions.showAddServiceInterface} |
167 | searchRecipes={e => this.searchRecipes(e)} | 172 | searchRecipes={e => this.searchRecipes(e)} |
168 | resetSearch={() => this.resetSearch()} | 173 | resetSearch={() => this.resetSearch()} |