// Path: app/src/main/java/org/xdty/kindle/contract/DetailContract.java
// public interface DetailContract {
// 
//     interface View extends BaseView<Presenter> {
//         void updateReview(String review);
// 
//         void openTab(String url);
//     }
// 
//     interface Presenter extends BasePresenter {
//         void start(Book itemId);
// 
//         void clickFab();
//     }
// }
// 
// Path: app/src/main/java/org/xdty/kindle/presenter/DetailPresenter.java
// public class DetailPresenter implements DetailContract.Presenter {
// 
//     @Inject
//     BookDataSource mBookDataSource;
//     private DetailContract.View mView;
//     private Book mBook;
//     private Review mReview;
// 
//     public DetailPresenter(DetailContract.View view) {
//         mView = view;
//         Application.getAppComponent().inject(this);
//     }
// 
//     @Override
//     public void start() {
// 
//     }
// 
//     @Override
//     public void clickFab() {
//         if (mBook != null) {
//             mView.openTab(mBook.getUrl());
//         }
//     }
// 
//     @Override
//     public void start(Book book) {
// 
//         mBook = book;
// 
//         if (book.getEditorialReview() == null) {
//             mBookDataSource.getReview(book.getItemId()).subscribe(new Action1<Review>() {
//                 @Override
//                 public void call(Review review) {
//                     mReview = review;
//                     mView.updateReview(review.getEditorialReview());
//                 }
//             });
//         }
//     }
// }


import org.xdty.kindle.contract.DetailContract;
import org.xdty.kindle.presenter.DetailPresenter;
import dagger.Module;
import dagger.Provides;
package org.xdty.kindle.di.modules;



@Module
public class DetailModule {

    private DetailContract.View mView;

    public DetailModule(DetailContract.View view) {
        mView = view;
    }

    @Provides
    DetailContract.View provideView() {
        return mView;
    }

    @Provides
    DetailContract.Presenter providePresenter() {
// Path: app/src/main/java/org/xdty/kindle/contract/DetailContract.java
// public interface DetailContract {
// 
//     interface View extends BaseView<Presenter> {
//         void updateReview(String review);
// 
//         void openTab(String url);
//     }
// 
//     interface Presenter extends BasePresenter {
//         void start(Book itemId);
// 
//         void clickFab();
//     }
// }
// 
// Path: app/src/main/java/org/xdty/kindle/presenter/DetailPresenter.java
// public class DetailPresenter implements DetailContract.Presenter {
// 
//     @Inject
//     BookDataSource mBookDataSource;
//     private DetailContract.View mView;
//     private Book mBook;
//     private Review mReview;
// 
//     public DetailPresenter(DetailContract.View view) {
//         mView = view;
//         Application.getAppComponent().inject(this);
//     }
// 
//     @Override
//     public void start() {
// 
//     }
// 
//     @Override
//     public void clickFab() {
//         if (mBook != null) {
//             mView.openTab(mBook.getUrl());
//         }
//     }
// 
//     @Override
//     public void start(Book book) {
// 
//         mBook = book;
// 
//         if (book.getEditorialReview() == null) {
//             mBookDataSource.getReview(book.getItemId()).subscribe(new Action1<Review>() {
//                 @Override
//                 public void call(Review review) {
//                     mReview = review;
//                     mView.updateReview(review.getEditorialReview());
//                 }
//             });
//         }
//     }
// }


// Path: app/src/main/java/org/xdty/kindle/di/modules/DetailModule.java
import org.xdty.kindle.contract.DetailContract;
import org.xdty.kindle.presenter.DetailPresenter;
import dagger.Module;
import dagger.Provides;

package org.xdty.kindle.di.modules;



@Module
public class DetailModule {

    private DetailContract.View mView;

    public DetailModule(DetailContract.View view) {
        mView = view;
    }

    @Provides
    DetailContract.View provideView() {
        return mView;
    }

    @Provides
    DetailContract.Presenter providePresenter() {
        return new DetailPresenter(mView);