File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
cardstackview/src/main/java/com/yuyakaido/android/cardstackview Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -122,9 +122,7 @@ private void initialize(boolean shouldReset) {
122
122
123
123
private void resetIfNeeded (boolean shouldReset ) {
124
124
if (shouldReset ) {
125
- state .topIndex = 0 ;
126
- state .lastPoint = null ;
127
- state .isInitialized = false ;
125
+ state .reset ();
128
126
}
129
127
}
130
128
Original file line number Diff line number Diff line change 5
5
public class CardStackState {
6
6
public int topIndex = 0 ;
7
7
public Point lastPoint = null ;
8
- public Integer lastCount = null ;
8
+ public int lastCount = 0 ;
9
9
public boolean isPaginationReserved = false ;
10
10
public boolean isInitialized = false ;
11
+ public void reset () {
12
+ topIndex = 0 ;
13
+ lastPoint = null ;
14
+ lastCount = 0 ;
15
+ isPaginationReserved = false ;
16
+ isInitialized = false ;
17
+ }
11
18
}
You can’t perform that action at this time.
0 commit comments