Remove unnecessary console.log statements across various components to clean up the codebase and improve performance.

This commit is contained in:
troyeguo
2025-12-18 20:41:28 +08:00
parent 9c74a09735
commit 19c373178f
10 changed files with 3 additions and 23 deletions

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

@@ -64,11 +64,6 @@ class UpdateInfo extends React.Component<UpdateInfoProps, UpdateInfoState> {
if ((process as any).windowsStore) {
return;
}
console.log(
packageInfo.version,
newVersion,
compareVersions(packageInfo.version, newVersion)
);
if (compareVersions(newVersion, packageInfo.version) > 0) {
if (
ConfigService.getReaderConfig("isDisableUpdate") !== "yes" ||

View File

@@ -32,7 +32,6 @@ class PopupBox extends React.Component<PopupBoxProps, PopupBoxStates> {
if (isElectron) {
const { ipcRenderer } = window.require("electron");
let isShowUrl = ipcRenderer.sendSync("url-window-status", "ping");
console.log("ishwo", isShowUrl);
this.setState({ isShowUrl });
}
}

View File

@@ -111,9 +111,6 @@ class Header extends React.Component<HeaderProps, HeaderState> {
ipcRenderer.on("reading-finished", async (event: any, config: any) => {
this.handleFinishReading();
});
ipcRenderer.on("log-message", (event, message) => {
console.log(`[Main Process Log]: ${message}`);
});
} else {
upgradeConfig();
const status = await LocalFileManager.getPermissionStatus();

View File

@@ -71,11 +71,6 @@ class BookList extends React.Component<BookListProps, BookListState> {
// 保存 visibilitychange 监听器引用
this.visibilityChangeHandler = async (event) => {
console.log(
document.visibilityState,
"visibilitychange",
ConfigService.getReaderConfig("isFinishWebReading")
);
if (document.visibilityState === "visible" && !isElectron) {
await this.handleFinishReading();
}
@@ -85,7 +80,6 @@ class BookList extends React.Component<BookListProps, BookListState> {
if (isElectron) {
const { ipcRenderer } = window.require("electron");
ipcRenderer.on("reading-finished", async (event: any, config: any) => {
console.log("asdfasgfdd");
this.handleFinishReading();
});
}
@@ -137,7 +131,6 @@ class BookList extends React.Component<BookListProps, BookListState> {
}
}
handleFinishReading = async () => {
console.log(this.scrollContainer, "scrollContainer");
if (!this.scrollContainer.current) return;
if (
this.scrollContainer.current &&

View File

@@ -114,7 +114,6 @@ class ContentList extends React.Component<ContentListProps, ContentListState> {
"recordLocation",
{}
);
console.log(bookLocation, "booklasf");
// 自动展开包含当前章节的路径
if (bookLocation.chapterHref) {
@@ -122,7 +121,6 @@ class ContentList extends React.Component<ContentListProps, ContentListState> {
htmlBook.chapters,
bookLocation
);
console.log(expandedPaths, "expandedPaths");
this.setState({ expandedItems: expandedPaths });
}

View File

@@ -140,7 +140,6 @@ class GeneralSetting extends React.Component<
window.require("path").join(newPath, "config", "config.json"),
"utf-8"
);
console.log(text, "text");
let config = JSON.parse(text);
for (let key in config) {
ConfigService.setItem(key, config[key]);

View File

@@ -1008,7 +1008,6 @@ export const resetKoodoSync = async () => {
};
export const handleCloudSync = async () => {
let syncRes = await getCloudSyncToken();
console.log(syncRes, "syncres");
if (
syncRes.code === 200 &&
syncRes.data.default_sync_option &&