mirror of
https://github.com/koodo-reader/koodo-reader.git
synced 2026-06-11 09:24:48 -04:00
Refactor components to improve logging and remove console statements
- Removed unnecessary console logs from ImportLocal, TextToSpeech, Header, and Viewer components to clean up the code and enhance performance. - Streamlined the components for better readability and maintainability by eliminating debug statements that are no longer needed.
This commit is contained in:
2
src/assets/lib/kookit.min.js
vendored
2
src/assets/lib/kookit.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -89,7 +89,6 @@ class ImportLocal extends React.Component<ImportLocalProps, ImportLocalState> {
|
||||
ipcRenderer.on("import-url-from-link", this.ipcImportUrlListener);
|
||||
}
|
||||
this.resizeHandler = throttle(() => {
|
||||
console.log("resize");
|
||||
this.setState({ width: document.body.clientWidth });
|
||||
});
|
||||
window.addEventListener("resize", this.resizeHandler);
|
||||
|
||||
@@ -557,7 +557,6 @@ class TextToSpeech extends React.Component<
|
||||
let nodeTextList = (await this.props.htmlBook.rendition.audioText()).filter(
|
||||
(item: string) => item && item.trim()
|
||||
);
|
||||
console.log("nodeTextList", nodeTextList);
|
||||
let rawNodeList: string[][] = [];
|
||||
if (
|
||||
this.props.currentBook.format === "PDF" &&
|
||||
|
||||
@@ -161,9 +161,6 @@ class Header extends React.Component<HeaderProps, HeaderState> {
|
||||
} else {
|
||||
upgradeConfig();
|
||||
const status = await LocalFileManager.getPermissionStatus();
|
||||
console.log(status, "status");
|
||||
console.log(ConfigService.getReaderConfig("isUseLocal"), "isUseLocal");
|
||||
console.log(LocalFileManager.isSupported(), "isSupported");
|
||||
if (
|
||||
!ConfigService.getReaderConfig("isUseLocal") &&
|
||||
LocalFileManager.isSupported()
|
||||
|
||||
@@ -124,7 +124,6 @@ class Viewer extends React.Component<ViewerProps, ViewerState> {
|
||||
}
|
||||
}
|
||||
handleHighlight = async (rendition: any) => {
|
||||
console.log("handleHighlight", rendition);
|
||||
if (!rendition) return;
|
||||
let highlighters: any = await DatabaseService.getRecordsByBookKey(
|
||||
this.props.currentBook.key,
|
||||
|
||||
Reference in New Issue
Block a user