为什么View中持有Model的引用?
lixplor opened this issue · 4 comments
lixplor commented
为什么V中持有M的引用? MVP不是要切断M和V的联系, 由P来控制吗? 这样如何解耦?
public abstract class BaseActivity<T extends BasePresenter, E extends BaseModel> extends AppCompatActivity {
public boolean isNight;
public T mPresenter;
public E mModel; <---?
north2016 commented
这里只是组装,并没有任何引用或调用的地方啊,只有P才能控制M
pexcn commented
组装?
RUANHAOANDROID commented
我看到这里也有点疑问 @fantasymaker-cn
north2016 commented
if (this instanceof BaseView) mPresenter.setVM(this, TUtil.getT(this, 1));这样明白了吗