@infinite-list/data-model
Advanced tools
Comparing version 0.2.7 to 0.2.8
{ | ||
"name": "@infinite-list/data-model", | ||
"version": "0.2.7", | ||
"version": "0.2.8", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "dist", |
@@ -835,4 +835,4 @@ import createStore from '../state/createStore'; | ||
bufferedEndIndex: 29, | ||
isEndReached: false, | ||
distanceFromEnd: 2064, | ||
isEndReached: true, | ||
distanceFromEnd: 1574, | ||
data: data.slice(0, 30), | ||
@@ -857,3 +857,3 @@ actionType: 'hydrationWithBatchUpdate', | ||
isEndReached: false, | ||
distanceFromEnd: 2064, | ||
distanceFromEnd: 4074, | ||
data: data.slice(0, 30), | ||
@@ -860,0 +860,0 @@ actionType: 'recalculate', |
@@ -27,5 +27,12 @@ import preCheck from './middleware/preCheck'; | ||
) { | ||
if (state.actionType === 'hydrationWithBatchUpdate') return state; | ||
if (state.actionType === 'hydrationWithBatchUpdate') | ||
return { | ||
...state, | ||
isEndReached: payload.isEndReached, | ||
distanceFromEnd: payload.distanceFromEnd, | ||
}; | ||
return { | ||
...state, | ||
isEndReached: payload.isEndReached, | ||
distanceFromEnd: payload.distanceFromEnd, | ||
actionType: 'hydrationWithBatchUpdate', | ||
@@ -77,5 +84,12 @@ }; | ||
) { | ||
if (state.actionType === 'recalculate') return state; | ||
if (state.actionType === 'recalculate') | ||
return { | ||
...state, | ||
isEndReached: payload.isEndReached, | ||
distanceFromEnd: payload.distanceFromEnd, | ||
}; | ||
return { | ||
...state, | ||
isEndReached: payload.isEndReached, | ||
distanceFromEnd: payload.distanceFromEnd, | ||
actionType: 'recalculate', | ||
@@ -125,6 +139,13 @@ }; | ||
) { | ||
if (state.actionType === 'scrollDown') return state; | ||
if (state.actionType === 'scrollDown') | ||
return { | ||
...state, | ||
isEndReached: payload.isEndReached, | ||
distanceFromEnd: payload.distanceFromEnd, | ||
}; | ||
return { | ||
...state, | ||
isEndReached: payload.isEndReached, | ||
distanceFromEnd: payload.distanceFromEnd, | ||
actionType: 'scrollDown', | ||
@@ -175,6 +196,13 @@ }; | ||
) { | ||
if (state.actionType === 'scrollUp') return state; | ||
if (state.actionType === 'scrollUp') | ||
return { | ||
...state, | ||
isEndReached: payload.isEndReached, | ||
distanceFromEnd: payload.distanceFromEnd, | ||
}; | ||
return { | ||
...state, | ||
isEndReached: payload.isEndReached, | ||
distanceFromEnd: payload.distanceFromEnd, | ||
actionType: 'scrollUp', | ||
@@ -181,0 +209,0 @@ }; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1622247
19569