Last active
October 3, 2017 00:27
-
-
Save jianxiansiqi47/a584d640c138419586ed364f9b781d46 to your computer and use it in GitHub Desktop.
DealPresenterV1 - TP Article
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DealPresenter { | |
@VisibleForTesting Deal deal; | |
private DealUtil dealUtil; | |
private DealApiClient dealApiClient; | |
private WishlistManager wishlistManager; | |
private DealViewStateModel dealViewStateModel; | |
public DealPresenter(DealUtil dealUtil, DealApiclient dealApiClient, WishlistManager wishlistManager, DealViewStateModel dealViewStateModel) { | |
this.dealUtil = dealUtil; | |
this.dealApiClient = dealApiClient; | |
this.wishlistManager = wishlistManager; | |
this.dealViewStateModel = dealViewStateModel; | |
} | |
... | |
public void onWishlistSelected() { | |
if (dealUtil.isWishlistEnabled(deal)) { | |
wishlistManager.addDealToWishlist(deal.dealId); | |
} | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment