Skip to content
This repository has been archived by the owner on Jul 6, 2019. It is now read-only.

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
skyinu committed Aug 23, 2017
1 parent 8db8f0d commit 3180456
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
versionCode 1
versionName "1.1"
versionName "1.1.1"
externalNativeBuild {
cmake {
cppFlags ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void addContentListModel(List<V2ExBean> contentListModel) {
}

public boolean isModelEmpty(){
return mContentListModel.isEmpty();
return mContentListModel.isEmpty() ;
}

public void clearModel(){
Expand All @@ -35,6 +35,9 @@ public void save(Bundle bundle){
bundle.putParcelableArrayList(KEY_V2EXBEAN, (ArrayList<? extends Parcelable>) mContentListModel);
}
public boolean restore(Bundle bundle){
if(bundle == null){
return false;
}
mContentListModel = bundle.getParcelableArrayList(KEY_V2EXBEAN);
return mContentListModel != null && !mContentListModel.isEmpty();
}
Expand Down
3 changes: 2 additions & 1 deletion v2api/src/main/java/com/stdnull/v2api/ui/V2MainFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,13 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
builder()
.v2MainModule(new V2MainModule(this))
.build().inject(this);
mV2MainPresenter.restore(savedInstanceState);
}

@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
mV2MainPresenter.restore(outState);
mV2MainPresenter.save(outState);
}

@Nullable
Expand Down

0 comments on commit 3180456

Please sign in to comment.