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

Commit 3180456

Browse files
committed
bug fix
1 parent 8db8f0d commit 3180456

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ android {
99
minSdkVersion rootProject.minSdkVersion
1010
targetSdkVersion rootProject.targetSdkVersion
1111
versionCode 1
12-
versionName "1.1"
12+
versionName "1.1.1"
1313
externalNativeBuild {
1414
cmake {
1515
cppFlags ""

v2api/src/main/java/com/stdnull/v2api/model/V2MainFragModel.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public void addContentListModel(List<V2ExBean> contentListModel) {
2525
}
2626

2727
public boolean isModelEmpty(){
28-
return mContentListModel.isEmpty();
28+
return mContentListModel.isEmpty() ;
2929
}
3030

3131
public void clearModel(){
@@ -35,6 +35,9 @@ public void save(Bundle bundle){
3535
bundle.putParcelableArrayList(KEY_V2EXBEAN, (ArrayList<? extends Parcelable>) mContentListModel);
3636
}
3737
public boolean restore(Bundle bundle){
38+
if(bundle == null){
39+
return false;
40+
}
3841
mContentListModel = bundle.getParcelableArrayList(KEY_V2EXBEAN);
3942
return mContentListModel != null && !mContentListModel.isEmpty();
4043
}

v2api/src/main/java/com/stdnull/v2api/ui/V2MainFragment.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,13 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
5757
builder()
5858
.v2MainModule(new V2MainModule(this))
5959
.build().inject(this);
60+
mV2MainPresenter.restore(savedInstanceState);
6061
}
6162

6263
@Override
6364
public void onSaveInstanceState(Bundle outState) {
6465
super.onSaveInstanceState(outState);
65-
mV2MainPresenter.restore(outState);
66+
mV2MainPresenter.save(outState);
6667
}
6768

6869
@Nullable

0 commit comments

Comments
 (0)