intermediate commit

This commit is contained in:
lotte
2020-02-03 12:58:24 +01:00
parent 28747314e6
commit 360abb78de
12 changed files with 114 additions and 84 deletions

View File

@@ -9,7 +9,7 @@ import { RestRequestMethod } from '../data/rest-request-method';
/**
* An entry in the ServerSyncBufferState
* href: unique href of an ObjectCacheEntry
* href: unique href of an ServerSyncBufferEntry
* method: RestRequestMethod type
*/
export class ServerSyncBufferEntry {
@@ -48,6 +48,7 @@ export function serverSyncBufferReducer(state = initialState, action: ServerSync
case ServerSyncBufferActionTypes.EMPTY: {
return emptyServerSyncQueue(state, action as EmptySSBAction);
}
default: {
return state;
}
@@ -69,6 +70,7 @@ function addToServerSyncQueue(state: ServerSyncBufferState, action: AddToSSBActi
if (hasNoValue(state.buffer.find((entry) => entry.href === actionEntry.href && entry.method === actionEntry.method))) {
return Object.assign({}, state, { buffer: state.buffer.concat(actionEntry) });
}
return state;
}
/**