Commit 28e3bd5b by sikang

bug fix

parent 045c03d4
...@@ -103,7 +103,7 @@ public abstract class BaseActivity extends AppCompatActivity implements IView { ...@@ -103,7 +103,7 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
if ("HomeActivity".equals(TAG)) { if ("HomeActivity".equals(TAG)) {
getPresenter(UserPresenter.class).getCustomerMsg(""); getPresenter(UserPresenter.class).getCustomerMsg("");
} }
if(getTrustee()==null){ if(getTrustee()!=null){
getTrustee().onCreate(); getTrustee().onCreate();
} }
} }
...@@ -124,7 +124,7 @@ public abstract class BaseActivity extends AppCompatActivity implements IView { ...@@ -124,7 +124,7 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
// MsgHandleService.handleMsg(this, new RemoteMessage(getIntent().getExtras())); // MsgHandleService.handleMsg(this, new RemoteMessage(getIntent().getExtras()));
// } // }
lifecycleSubject.onNext(ActivityEvent.START); lifecycleSubject.onNext(ActivityEvent.START);
if(getTrustee()==null){ if(getTrustee()!=null){
getTrustee().onStart(); getTrustee().onStart();
} }
} }
...@@ -132,7 +132,7 @@ public abstract class BaseActivity extends AppCompatActivity implements IView { ...@@ -132,7 +132,7 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
@Override @Override
protected void onRestart() { protected void onRestart() {
super.onRestart(); super.onRestart();
if(getTrustee()==null){ if(getTrustee()!=null){
getTrustee().onRestart(); getTrustee().onRestart();
} }
} }
...@@ -141,7 +141,7 @@ public abstract class BaseActivity extends AppCompatActivity implements IView { ...@@ -141,7 +141,7 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
protected void onResume() { protected void onResume() {
super.onResume(); super.onResume();
lifecycleSubject.onNext(ActivityEvent.RESUME); lifecycleSubject.onNext(ActivityEvent.RESUME);
if(getTrustee()==null){ if(getTrustee()!=null){
getTrustee().onResume(); getTrustee().onResume();
} }
} }
...@@ -151,7 +151,7 @@ public abstract class BaseActivity extends AppCompatActivity implements IView { ...@@ -151,7 +151,7 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
super.onPause(); super.onPause();
lifecycleSubject.onNext(ActivityEvent.PAUSE); lifecycleSubject.onNext(ActivityEvent.PAUSE);
progressDialog.dissmissLoading(); progressDialog.dissmissLoading();
if(getTrustee()==null){ if(getTrustee()!=null){
getTrustee().onPause(); getTrustee().onPause();
} }
} }
...@@ -161,7 +161,7 @@ public abstract class BaseActivity extends AppCompatActivity implements IView { ...@@ -161,7 +161,7 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
super.onStop(); super.onStop();
progressDialog.setEnable(false); progressDialog.setEnable(false);
lifecycleSubject.onNext(ActivityEvent.STOP); lifecycleSubject.onNext(ActivityEvent.STOP);
if(getTrustee()==null){ if(getTrustee()!=null){
getTrustee().onStop(); getTrustee().onStop();
} }
} }
...@@ -174,7 +174,7 @@ public abstract class BaseActivity extends AppCompatActivity implements IView { ...@@ -174,7 +174,7 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
} }
lifecycleSubject.onNext(ActivityEvent.DESTROY); lifecycleSubject.onNext(ActivityEvent.DESTROY);
presenterHelper.onDestory(); presenterHelper.onDestory();
if(getTrustee()==null){ if(getTrustee()!=null){
getTrustee().onDestroy(); getTrustee().onDestroy();
} }
} }
...@@ -333,7 +333,7 @@ public abstract class BaseActivity extends AppCompatActivity implements IView { ...@@ -333,7 +333,7 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
public FragmentLauncher getFragmentLauncher() { public FragmentLauncher getFragmentLauncher() {
if (bindFragmentLayout() != 0 && fragmentLauncher == null) { if (bindFragmentLayout() != 0 && fragmentLauncher == null) {
fragmentLauncher = new FragmentLauncher(this, bindFragmentLayout()); fragmentLauncher = new FragmentLauncher(this, bindFragmentLayout());
if(getTrustee()==null){ if(getTrustee()!=null){
getTrustee().setFragmentLauncher(fragmentLauncher); getTrustee().setFragmentLauncher(fragmentLauncher);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment