Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
DealPresenterV2 - TP article
public class DealPresenter {
@VisibleForTesting Deal deal;
@Inject DealUtil dealUtil;
@Inject DealApiClient dealApiClient;
@Inject DealViewStateModel dealViewStateModel;
@Inject WishlistManager wishlistManager;
// We do not need the constructor anymore
...
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