remove use of thunk action in ble and hub

This is a step towards moving these to sagas
This commit is contained in:
David Lechner
2020-05-27 20:57:22 -05:00
committed by David Lechner
parent 99fd62100d
commit 24acab901c
16 changed files with 356 additions and 260 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ const disconnect: Epic = (action$) =>
const rxUartData: Epic<AnyAction, AnyAction, RootState> = (action$, state$) =>
action$.pipe(
ofType<AnyAction, BLEDataAction>(BLEDataActionType.ReceivedData),
ofType<AnyAction, BLEDataAction>(BLEDataActionType.Notify),
map((a) => {
if (
state$.value.hub.runtime === HubRuntimeState.Loading &&
+2 -2
View File
@@ -5,13 +5,13 @@ import { AnyAction } from 'redux';
import { Epic, combineEpics, ofType } from 'redux-observable';
import { Subject } from 'rxjs';
import { ignoreElements, take, tap } from 'rxjs/operators';
import { HubActionType, HubChecksumAction } from '../actions/hub';
import { HubChecksumMessageAction, HubMessageActionType } from '../actions/hub';
const checksumSubject = new Subject<number>();
const checksum: Epic = (action$) =>
action$.pipe(
ofType<AnyAction, HubChecksumAction>(HubActionType.Checksum),
ofType<AnyAction, HubChecksumMessageAction>(HubMessageActionType.Checksum),
tap((a) => checksumSubject.next(a.checksum)),
ignoreElements(),
);