forked from eatvio/eatvio_app
changed logic of view requests sending
This commit is contained in:
@@ -42,7 +42,7 @@ class Diets extends StatelessWidget {
|
||||
key: ValueKey(index),
|
||||
onVisibilityChanged: (info) {
|
||||
final id = state.dietsList[index].id;
|
||||
handleVisibility(visibleFraction: info.visibleFraction, id: id, type: ViewableContentType.posts);
|
||||
handleVisibility(visibleFraction: info.visibleFraction, id: id, type: ViewableContentType.diets);
|
||||
},
|
||||
child: DietsWidget(diet: state.dietsList[index], index: index),
|
||||
);
|
||||
|
||||
@@ -42,7 +42,7 @@ class Plans extends StatelessWidget {
|
||||
key: ValueKey(index),
|
||||
onVisibilityChanged: (info) {
|
||||
final id = state.plans[index].id;
|
||||
handleVisibility(visibleFraction: info.visibleFraction, id: id, type: ViewableContentType.posts);
|
||||
handleVisibility(visibleFraction: info.visibleFraction, id: id, type: ViewableContentType.plans);
|
||||
},
|
||||
child: PlanWidget(plan: state.plans[index], index: index),
|
||||
);
|
||||
|
||||
@@ -46,7 +46,7 @@ class Recipes extends StatelessWidget {
|
||||
key: ValueKey(index),
|
||||
onVisibilityChanged: (info) {
|
||||
final id = state.recipesList[index].id;
|
||||
handleVisibility(visibleFraction: info.visibleFraction, id: id, type: ViewableContentType.posts);
|
||||
handleVisibility(visibleFraction: info.visibleFraction, id: id, type: ViewableContentType.recipes);
|
||||
},
|
||||
child: RecipesWidget(
|
||||
recipe: state.recipesList[index],
|
||||
|
||||
Reference in New Issue
Block a user