File tree 1 file changed +19
-3
lines changed
1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -316,9 +316,25 @@ function* readerSetReduxState(action: readerActions.setReduxState.TAction) {
316
316
317
317
const { winId, reduxState } = action . payload ;
318
318
319
- const pubId = yield * selectTyped (
320
- ( state : RootState ) => state ?. win ?. session ?. reader [ winId ] ?. reduxState ?. info ?. publicationIdentifier ) ;
321
- yield put ( winActions . session . setReduxState . build ( winId , pubId , reduxState ) ) ;
319
+ // const pubId = yield* selectTyped(
320
+ // (state: RootState) => state?.win?.session?.reader[winId]?.reduxState?.info?.publicationIdentifier);
321
+ // yield put(winActions.session.setReduxState.build(winId, pubId, reduxState));
322
+
323
+ const readers = yield * selectTyped ( ( state : RootState ) => state . win . session . reader ) ;
324
+ const reader = readers [ winId ] ;
325
+
326
+ if ( reader ) {
327
+
328
+ yield put ( winActions . session . setReduxState . build ( winId , reader . publicationIdentifier , reduxState ) ) ;
329
+
330
+ yield put ( winActions . registry . registerReaderPublication . build (
331
+ reader . publicationIdentifier ,
332
+ reader . windowBound ,
333
+ reader . reduxState ) ,
334
+ ) ;
335
+ } else {
336
+ debug ( "!!! Error no reader window found, why ??" , winId ) ;
337
+ }
322
338
}
323
339
324
340
function * readerClipboardCopy ( action : readerActions . clipboardCopy . TAction ) {
You can’t perform that action at this time.
0 commit comments