-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(API): switch catalog/get API to redux/redux-saga logic
(Fixes #1993) I improve the catalogView update to not always re-render it when setReduxState from reader is dispatched. It appears that setReduxState is lot of time dispatched across the app to keep the readingLocation synchronized beetween the main process and renderer process
- Loading branch information
Showing
20 changed files
with
398 additions
and
293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// ==LICENSE-BEGIN== | ||
// Copyright 2017 European Digital Reading Lab. All rights reserved. | ||
// Licensed to the Readium Foundation under one or more contributor license agreements. | ||
// Use of this source code is governed by a BSD-style license | ||
// that can be found in the LICENSE file exposed on Github (readium) in the project repository. | ||
// ==LICENSE-END== | ||
|
||
import { Action } from "readium-desktop/common/models/redux"; | ||
|
||
export const ID = "CATALOG_GET"; | ||
|
||
export interface Payload { | ||
} | ||
|
||
export function build(): | ||
Action<typeof ID, Payload> { | ||
|
||
return { | ||
type: ID, | ||
payload: { | ||
}, | ||
}; | ||
} | ||
build.toString = () => ID; // Redux StringableActionCreator | ||
export type TAction = ReturnType<typeof build>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// ==LICENSE-BEGIN== | ||
// Copyright 2017 European Digital Reading Lab. All rights reserved. | ||
// Licensed to the Readium Foundation under one or more contributor license agreements. | ||
// Use of this source code is governed by a BSD-style license | ||
// that can be found in the LICENSE file exposed on Github (readium) in the project repository. | ||
// ==LICENSE-END== | ||
|
||
import * as getCatalog from "./getCatalog"; | ||
import * as setCatalog from "./setCatalog"; | ||
|
||
export { | ||
getCatalog, | ||
setCatalog, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// ==LICENSE-BEGIN== | ||
// Copyright 2017 European Digital Reading Lab. All rights reserved. | ||
// Licensed to the Readium Foundation under one or more contributor license agreements. | ||
// Use of this source code is governed by a BSD-style license | ||
// that can be found in the LICENSE file exposed on Github (readium) in the project repository. | ||
// ==LICENSE-END== | ||
|
||
import { Action } from "readium-desktop/common/models/redux"; | ||
import { CatalogView } from "readium-desktop/common/views/catalog"; | ||
|
||
export const ID = "CATALOG_SET_VIEW"; | ||
|
||
export interface Payload { | ||
catalogView: CatalogView; | ||
} | ||
|
||
export function build(catalogView: CatalogView): | ||
Action<typeof ID, Payload> { | ||
|
||
return { | ||
type: ID, | ||
payload: { | ||
catalogView, | ||
}, | ||
}; | ||
} | ||
build.toString = () => ID; // Redux StringableActionCreator | ||
export type TAction = ReturnType<typeof build>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.