This repository was archived by the owner on Jul 6, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
v2api/src/main/java/com/stdnull/v2api Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ android {
9
9
minSdkVersion rootProject. minSdkVersion
10
10
targetSdkVersion rootProject. targetSdkVersion
11
11
versionCode 1
12
- versionName " 1.1"
12
+ versionName " 1.1.1 "
13
13
externalNativeBuild {
14
14
cmake {
15
15
cppFlags " "
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public void addContentListModel(List<V2ExBean> contentListModel) {
25
25
}
26
26
27
27
public boolean isModelEmpty (){
28
- return mContentListModel .isEmpty ();
28
+ return mContentListModel .isEmpty () ;
29
29
}
30
30
31
31
public void clearModel (){
@@ -35,6 +35,9 @@ public void save(Bundle bundle){
35
35
bundle .putParcelableArrayList (KEY_V2EXBEAN , (ArrayList <? extends Parcelable >) mContentListModel );
36
36
}
37
37
public boolean restore (Bundle bundle ){
38
+ if (bundle == null ){
39
+ return false ;
40
+ }
38
41
mContentListModel = bundle .getParcelableArrayList (KEY_V2EXBEAN );
39
42
return mContentListModel != null && !mContentListModel .isEmpty ();
40
43
}
Original file line number Diff line number Diff line change @@ -57,12 +57,13 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
57
57
builder ()
58
58
.v2MainModule (new V2MainModule (this ))
59
59
.build ().inject (this );
60
+ mV2MainPresenter .restore (savedInstanceState );
60
61
}
61
62
62
63
@ Override
63
64
public void onSaveInstanceState (Bundle outState ) {
64
65
super .onSaveInstanceState (outState );
65
- mV2MainPresenter .restore (outState );
66
+ mV2MainPresenter .save (outState );
66
67
}
67
68
68
69
@ Nullable
You can’t perform that action at this time.
0 commit comments