Skip to content

Instantly share code, notes, and snippets.

@MattNewberry
Created November 22, 2019 19:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MattNewberry/a967faf2e7a398a28156320d4c4d32ca to your computer and use it in GitHub Desktop.
Save MattNewberry/a967faf2e7a398a28156320d4c4d32ca to your computer and use it in GitHub Desktop.
diff --git a/buyonetsy/Favorites/BOEFavoritesAndListsViewController.m b/buyonetsy/Favorites/BOEFavoritesAndListsViewController.m
index cf1abc0460..5a210231a4 100644
--- a/buyonetsy/Favorites/BOEFavoritesAndListsViewController.m
+++ b/buyonetsy/Favorites/BOEFavoritesAndListsViewController.m
@@ -21,6 +21,7 @@
@interface BOEFavoritesAndListsViewController() <BOEFavoritesRecommendationViewDelegate, BOEFavoritesRecommendationResourceDelegate>
@property (nonatomic, nullable) FavoritesRecommendationView *favsRecommendationsView;
+@property (nonatomic, strong) BOEFavoritesRecommendationResource * favsRecsResource;
@end
@@ -77,6 +78,8 @@ - (void)viewDidLoad {
[self.analyticsContext.viewRenderingMetrics startTimer];
[self setUpFavoriteRecommentionView];
+
+ self.favsRecsResource = [[BOEFavoritesRecommendationResource alloc] init];
}
- (void)viewDidAppear:(BOOL)animated {
@@ -147,17 +150,23 @@ - (NSString *)shareURL {
return self.metadata[@"share_url"];
}
+- (void)loadMore {
+ [super loadMore];
+}
+
+- (void)loadModulesWithRefresh:(BOOL)shouldRefresh {
+ [super loadModulesWithRefresh:shouldRefresh];
+
+ if ([self.analyticsContext isFlagEnabled:@"BOERecommendationsInFavsAndLists"]) {
+ self.favsRecsResource.delegate = self;
+ [self.favsRecsResource load];
+ }
+}
- (void)setUpFavoriteRecommentionView {
if (self.isShowingError) {
return;
}
-
- if ([self.analyticsContext isFlagEnabled:@"BOERecommendationsInFavsAndLists"]) {
- BOEFavoritesRecommendationResource * favsRecsResource = [[BOEFavoritesRecommendationResource alloc] init];
- favsRecsResource.delegate = self;
- [favsRecsResource load];
- }
}
- (void)didFinishLoadRecommendationResourceWithResponse:(BOEFavoritesRecommendationResponse *)response {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment