diff --git a/src/components/Fullscreen.js b/src/components/Fullscreen.js
deleted file mode 100644
index d96dbbd3..00000000
--- a/src/components/Fullscreen.js
+++ /dev/null
@@ -1,2 +0,0 @@
-import {NativeModules} from 'react-native';
-module.exports = NativeModules.FullScreen;
diff --git a/src/components/NovelCover.js b/src/components/NovelCover.js
index 6589ad72..834fdf3a 100644
--- a/src/components/NovelCover.js
+++ b/src/components/NovelCover.js
@@ -37,6 +37,7 @@ const NovelCover = ({
const getHeight = useCallback(
() => (window.width / getNovelsPerRow()) * (4 / 3),
+ // eslint-disable-next-line react-hooks/exhaustive-deps
[],
);
diff --git a/src/components/RadioButton.js b/src/components/RadioButton.js
deleted file mode 100644
index 64715893..00000000
--- a/src/components/RadioButton.js
+++ /dev/null
@@ -1,40 +0,0 @@
-import React from 'react';
-import {StyleSheet, View, Text} from 'react-native';
-import {RadioButton as MaterialRadioButton} from 'react-native-paper';
-
-export const RadioButtonGroup = ({children, value, onValueChange}) => (
-
- {children}
-
-);
-
-export const RadioButton = ({value, label, theme, labelStyle}) => (
-
-
-
- {label}
-
-
-);
-
-const styles = StyleSheet.create({
- radioButtonContainer: {
- flexDirection: 'row',
- alignItems: 'center',
- paddingVertical: 8,
- },
- radioButtonLabel: {
- marginLeft: 16,
- fontSize: 16,
- },
-});
diff --git a/src/components/Searchbar/Searchbar.js b/src/components/Searchbar/Searchbar.js
index f2838840..bc9927c0 100644
--- a/src/components/Searchbar/Searchbar.js
+++ b/src/components/Searchbar/Searchbar.js
@@ -60,7 +60,7 @@ export const Searchbar = ({
color={action.color ?? theme.textColorPrimary}
onPress={action.onPress}
theme={theme}
- containerStyle={{marginRight: 0}}
+ containerStyle={{marginRight: 0, marginLeft: 6}}
/>
))}
diff --git a/src/database/queries/ChapterQueries.js b/src/database/queries/ChapterQueries.js
index e994c38b..87fcfded 100644
--- a/src/database/queries/ChapterQueries.js
+++ b/src/database/queries/ChapterQueries.js
@@ -29,9 +29,11 @@ export const insertChapters = async (novelId, chapters) => {
// )
),
(txObj, res) => {
- console.log('Success');
+ // console.log('Success');
+ },
+ (txObj, error) => {
+ // console.log('Error ', error)
},
- (txObj, error) => console.log('Error ', error),
);
});
};
@@ -48,7 +50,9 @@ export const getChapters = (novelId, sort, filter) => {
(txObj, {rows: {_array}}) => {
resolve(_array);
},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
}),
);
@@ -65,7 +69,9 @@ export const getChapterFromDB = async chapterId => {
(txObj, results) => {
resolve(results.rows.item(0));
},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
}),
);
@@ -80,7 +86,9 @@ export const getNextChapterFromDB = async (novelId, chapterId) => {
(txObj, results) => {
resolve(results.rows.item(0));
},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
}),
);
@@ -95,7 +103,9 @@ export const getPrevChapterFromDB = async (novelId, chapterId) => {
(txObj, results) => {
resolve(results.rows.item(results.rows.length - 1));
},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
}),
);
@@ -110,7 +120,9 @@ export const markChapterRead = async chapterId => {
markChapterReadQuery,
[chapterId],
(txObj, res) => {},
- (txObj, error) => console.log(error),
+ (txObj, error) => {
+ // console.log(error)
+ },
);
});
};
@@ -124,7 +136,9 @@ export const markChapterUnread = async chapterId => {
markChapterUnreadQuery,
[chapterId],
(txObj, res) => {},
- (txObj, error) => console.log(error),
+ (txObj, error) => {
+ // console.log(error)
+ },
);
});
};
@@ -138,7 +152,9 @@ export const markAllChaptersRead = async novelId => {
markAllChaptersReadQuery,
[novelId],
(txObj, res) => {},
- (txObj, error) => console.log(error),
+ (txObj, error) => {
+ // console.log(error)
+ },
);
});
};
@@ -152,7 +168,9 @@ export const markAllChaptersUnread = async novelId => {
markAllChaptersUnreadQuery,
[novelId],
(txObj, res) => {},
- (txObj, error) => console.log(error),
+ (txObj, error) => {
+ // console.log(error)
+ },
);
});
};
@@ -173,7 +191,9 @@ export const isChapterDownloaded = async chapterId => {
resolve(false);
}
},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
}),
);
@@ -202,7 +222,9 @@ export const downloadChapter = async (
(txObj, res) => {
// console.log(`Downloaded Chapter ${chapter.chapterUrl}`);
},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
});
};
@@ -217,13 +239,19 @@ export const deleteChapter = async chapterId => {
updateIsDownloadedQuery,
[chapterId],
(txObj, res) => {},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
tx.executeSql(
deleteChapterQuery,
[chapterId],
- (txObj, res) => console.log('Chapter deleted'),
- (txObj, error) => console.log('Error ', error),
+ (txObj, res) => {
+ // console.log('Chapter deleted');
+ },
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
});
};
@@ -243,7 +271,9 @@ export const getLastReadChapter = async novelId => {
getLastReadChapterQuery,
[novelId],
(txObj, {rows}) => resolve(rows.item(0)),
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
});
});
@@ -258,7 +288,9 @@ export const bookmarkChapter = async (bookmark, chapterId) => {
bookmarkChapterQuery,
[!bookmark, chapterId],
(txObj, res) => {},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
});
};
@@ -272,7 +304,9 @@ export const markPreviuschaptersRead = async (chapterId, novelId) => {
markPreviuschaptersReadQuery,
[chapterId, novelId],
(txObj, res) => {},
- (txObj, error) => console.log(error),
+ (txObj, error) => {
+ // console.log(error)
+ },
);
});
};
@@ -286,7 +320,9 @@ export const markPreviousChaptersUnread = async (chapterId, novelId) => {
markPreviousChaptersUnreadQuery,
[chapterId, novelId],
(txObj, res) => {},
- (txObj, error) => console.log(error),
+ (txObj, error) => {
+ // console.log(error)
+ },
);
});
};
@@ -307,7 +343,9 @@ export const getDownloadedChapters = () => {
(txObj, {rows: {_array}}) => {
resolve(_array);
},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
}),
);
diff --git a/src/database/queries/HistoryQueries.js b/src/database/queries/HistoryQueries.js
index 6f55750d..2278d2a3 100644
--- a/src/database/queries/HistoryQueries.js
+++ b/src/database/queries/HistoryQueries.js
@@ -24,7 +24,9 @@ export const getHistoryFromDb = async () => {
(txObj, {rows: {_array}}) => {
resolve(_array);
},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
});
});
@@ -38,7 +40,9 @@ export const insertHistory = async (novelId, chapterId) => {
"INSERT OR REPLACE INTO history (historyNovelId, historyChapterId, historyTimeRead) VALUES (?, ?, (datetime('now','localtime')))",
[novelId, chapterId],
(txObj, res) => {},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
tx.executeSql('UPDATE novels SET unread = 0 WHERE novelId = ?', [novelId]);
});
@@ -50,7 +54,9 @@ export const deleteHistory = async historyId => {
'DELETE FROM history WHERE historyId = ?',
[historyId],
(txObj, res) => {},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
});
};
diff --git a/src/database/queries/LibraryQueries.js b/src/database/queries/LibraryQueries.js
index 344b5554..6141538e 100644
--- a/src/database/queries/LibraryQueries.js
+++ b/src/database/queries/LibraryQueries.js
@@ -32,7 +32,9 @@ export const getLibrary = (sort, filter) => {
// console.log(_array);
resolve(_array);
},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error);
+ },
);
}),
);
@@ -68,7 +70,9 @@ export const searchLibrary = (searchText, sort, filter) => {
searchLibraryQuery(searchText, sort, filter),
null,
(txObj, {rows: {_array}}) => resolve(_array),
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error);
+ },
);
});
});
diff --git a/src/database/queries/NovelQueries.js b/src/database/queries/NovelQueries.js
index d0873968..683e1fd5 100644
--- a/src/database/queries/NovelQueries.js
+++ b/src/database/queries/NovelQueries.js
@@ -31,7 +31,9 @@ export const insertNovel = async novel => {
novel.genre,
],
(txObj, {insertId}) => resolve(insertId),
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
),
),
);
@@ -43,7 +45,9 @@ export const followNovel = async (followed, novelId) => {
'UPDATE novels SET followed = ? WHERE novelId = ?',
[!followed, novelId],
(txo, res) => {},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
});
};
@@ -54,7 +58,9 @@ export const unfollowNovel = async novelId => {
'UPDATE novels SET followed = 0 WHERE novelId = ?',
[novelId],
(txo, res) => {},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
});
};
@@ -74,7 +80,9 @@ export const checkNovelInCache = novelUrl => {
resolve(false);
}
},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
}),
);
@@ -87,7 +95,9 @@ export const getNovel = async (sourceId, novelUrl) => {
'SELECT * FROM novels WHERE novelUrl = ? AND sourceId = ?',
[novelUrl, sourceId],
(txObj, {rows}) => resolve(rows.item(0)),
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
}),
);
@@ -99,7 +109,9 @@ export const deleteNovelCache = () => {
'DELETE FROM novels WHERE followed = 0',
null,
(txObj, res) => showToast('Entries deleted'),
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
});
};
@@ -131,7 +143,9 @@ export const restoreLibrary = async novel => {
const chapters = await fetchChapters(novel.sourceId, novel.novelUrl);
await insertChapters(insertId, chapters);
},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
),
),
);
@@ -190,7 +204,9 @@ export const migrateNovel = async (sourceId, novelUrl) => {
await insertChapters(insertId, chapters);
resolve();
},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
),
);
});
@@ -218,7 +234,9 @@ export const updateNovelInfo = async (info, novelId) => {
novelId,
],
(txObj, res) => {},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
});
};
@@ -232,7 +250,9 @@ export const pickCustomNovelCover = async novelId => {
'UPDATE novels SET novelCover = ? WHERE novelId = ?',
[image.uri, novelId],
(txObj, res) => {},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
});
diff --git a/src/database/queries/UpdateQueries.js b/src/database/queries/UpdateQueries.js
index e814d8f0..bef9f9c0 100644
--- a/src/database/queries/UpdateQueries.js
+++ b/src/database/queries/UpdateQueries.js
@@ -22,7 +22,9 @@ export const getUpdates = async () => {
(txObj, {rows: {_array}}) => {
resolve(_array);
},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
});
});
@@ -34,7 +36,9 @@ export const deleteNovelUpdates = novelId => {
'DELETE FROM updates WHERE novelId = ?',
[novelId],
(txObj, res) => {},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error);
+ },
);
});
};
diff --git a/src/screens/browse/BrowseScreen.js b/src/screens/browse/BrowseScreen.js
index 2a3fc33a..6187af13 100644
--- a/src/screens/browse/BrowseScreen.js
+++ b/src/screens/browse/BrowseScreen.js
@@ -49,6 +49,7 @@ const Browse = ({navigation}) => {
useEffect(() => {
dispatch(getSourcesAction());
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const onRefresh = () => {
diff --git a/src/screens/browse/components/SourceItem.js b/src/screens/browse/components/SourceItem.js
index 8d7a0d15..d3cfaf49 100644
--- a/src/screens/browse/components/SourceItem.js
+++ b/src/screens/browse/components/SourceItem.js
@@ -15,6 +15,7 @@ const SourceItem = ({item, theme, isPinned, dispatch, navigation}) => {
sourceName: item.sourceName,
url: item.url,
}),
+ // eslint-disable-next-line react-hooks/exhaustive-deps
[],
);
diff --git a/src/screens/browse/discover/MalTopNovels.js b/src/screens/browse/discover/MalTopNovels.js
index 5e1f56e6..17a882e1 100644
--- a/src/screens/browse/discover/MalTopNovels.js
+++ b/src/screens/browse/discover/MalTopNovels.js
@@ -62,6 +62,7 @@ const BrowseMalScreen = ({navigation, route}) => {
useEffect(() => {
getNovels();
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const renderItem = ({item}) => (
diff --git a/src/screens/browse/globalsearch/GlobalSearch.js b/src/screens/browse/globalsearch/GlobalSearch.js
index 2a6e843d..e06fa635 100644
--- a/src/screens/browse/globalsearch/GlobalSearch.js
+++ b/src/screens/browse/globalsearch/GlobalSearch.js
@@ -47,6 +47,7 @@ const GlobalSearch = ({route, navigation}) => {
useEffect(() => {
novelName && onSubmitEditing();
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const clearSearchbar = () => setSearchText('');
diff --git a/src/screens/browse/migration/MigrationNovels.js b/src/screens/browse/migration/MigrationNovels.js
index dac6d303..6272cd82 100644
--- a/src/screens/browse/migration/MigrationNovels.js
+++ b/src/screens/browse/migration/MigrationNovels.js
@@ -79,6 +79,7 @@ const MigrationNovels = ({navigation, route}) => {
useEffect(() => {
getSearchResults();
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const renderItem = ({item}) => (
diff --git a/src/screens/history/components/HistoryItem.js b/src/screens/history/components/HistoryItem.js
index 5e4c3131..5f514418 100644
--- a/src/screens/history/components/HistoryItem.js
+++ b/src/screens/history/components/HistoryItem.js
@@ -29,6 +29,7 @@ const HistoryItem = ({history, theme, dispatch, navigation, deleteHistory}) => {
`Chapter ${parseChapterNumber(chapterName)} • ${moment(historyTimeRead)
.format('h:mm a')
.toUpperCase()}`,
+ // eslint-disable-next-line react-hooks/exhaustive-deps
[],
);
diff --git a/src/screens/library/LibraryScreen.js b/src/screens/library/LibraryScreen.js
index a6c77924..86e71430 100644
--- a/src/screens/library/LibraryScreen.js
+++ b/src/screens/library/LibraryScreen.js
@@ -60,11 +60,13 @@ const LibraryScreen = ({navigation}) => {
useCallback(() => {
setSearchText('');
dispatch(getLibraryAction(sort, filter));
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [getLibraryAction, sort, filter]),
);
useEffect(() => {
updateLibraryOnLaunch && dispatch(updateLibraryAction());
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const onRefresh = () => {
diff --git a/src/screens/more/DownloadsScreen.js b/src/screens/more/DownloadsScreen.js
index 77c5cdb3..5d75a72c 100644
--- a/src/screens/more/DownloadsScreen.js
+++ b/src/screens/more/DownloadsScreen.js
@@ -65,6 +65,7 @@ const Downloads = ({navigation}) => {
novelName: item.novelName,
bookmark: item.bookmark,
}),
+ // eslint-disable-next-line react-hooks/exhaustive-deps
[],
);
@@ -76,6 +77,7 @@ const Downloads = ({navigation}) => {
novelName: item.novelName,
novelCover: item.novelCover,
}),
+ // eslint-disable-next-line react-hooks/exhaustive-deps
[],
);
diff --git a/src/screens/novel/NovelScreen.js b/src/screens/novel/NovelScreen.js
index 335f8843..5707836e 100644
--- a/src/screens/novel/NovelScreen.js
+++ b/src/screens/novel/NovelScreen.js
@@ -90,6 +90,7 @@ const Novel = ({route, navigation}) => {
dispatch(
getNovelAction(followed, sourceId, novelUrl, novelId, sort, filter),
);
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [getNovelAction]);
const onRefresh = () => {
diff --git a/src/screens/novel/components/Tracker/TrackSearchDialog.js b/src/screens/novel/components/Tracker/TrackSearchDialog.js
index f9ece82b..d9943b14 100644
--- a/src/screens/novel/components/Tracker/TrackSearchDialog.js
+++ b/src/screens/novel/components/Tracker/TrackSearchDialog.js
@@ -32,6 +32,7 @@ const TrackSearchDialog = ({
useEffect(() => {
trackSearchDialog && getSearchresults();
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [trackSearchDialog]);
const renderSearchResultCard = item => (
diff --git a/src/screens/reader/ReaderScreen.js b/src/screens/reader/ReaderScreen.js
index a6388c5a..7a74d1c2 100644
--- a/src/screens/reader/ReaderScreen.js
+++ b/src/screens/reader/ReaderScreen.js
@@ -109,9 +109,7 @@ const Chapter = ({route, navigation}) => {
const [contentSize, setContentSize] = useState(0);
const [textToSpeech, setTextToSpeech] = useState();
- const [textToSpeechPosition, setTextToSpeechPosition] = useState({
- end: 0,
- });
+ const [textToSpeechPosition, setTextToSpeechPosition] = useState({end: 0});
useEffect(() => {
Tts.addEventListener('tts-start', () => setTextToSpeech('start'));
@@ -241,28 +239,33 @@ const Chapter = ({route, navigation}) => {
setPrevChapter(prevChap);
};
- useEffect(() => {
- setImmersiveMode();
- getChapter(chapterId);
+ useEffect(
+ () => {
+ setImmersiveMode();
+ getChapter(chapterId);
- if (!incognitoMode) {
- insertHistory(novelId, chapterId);
- dispatch({
- type: SET_LAST_READ,
- payload: {novelId, chapterId},
- });
- }
- }, []);
+ if (!incognitoMode) {
+ insertHistory(novelId, chapterId);
+ dispatch({
+ type: SET_LAST_READ,
+ payload: {novelId, chapterId},
+ });
+ }
+ }, // eslint-disable-next-line react-hooks/exhaustive-deps
+ [],
+ );
useEffect(() => {
navigation.addListener('beforeRemove', e => {
StatusBar.setHidden(false);
showNavigationBar();
});
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
useEffect(() => {
setPrevAndNextChap();
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [chapter]);
const [currentTime, setCurrentTime] = useState();
@@ -279,6 +282,7 @@ const Chapter = ({route, navigation}) => {
useEffect(() => {
if (!useWebViewForChapter && scrollPercentage !== 100 && autoScroll) {
+ // eslint-disable-next-line react-hooks/exhaustive-deps
scrollTimeout = setTimeout(() => {
scrollViewRef.current.scrollTo({
x: 0,
@@ -334,6 +338,7 @@ const Chapter = ({route, navigation}) => {
dispatch(markChapterReadAction(chapterId, novelId));
updateTracker();
}
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const setImmersiveMode = () => {
@@ -346,17 +351,20 @@ const Chapter = ({route, navigation}) => {
}
};
- const scrollToSavedProgress = useCallback(event => {
- if (position && firstLayout) {
- position.percentage < 100 &&
- scrollViewRef.current.scrollTo({
- x: 0,
- y: position.position,
- animated: false,
- });
- setFirstLayout(false);
- }
- }, []);
+ const scrollToSavedProgress = useCallback(
+ event => {
+ if (position && firstLayout) {
+ position.percentage < 100 &&
+ scrollViewRef.current.scrollTo({
+ x: 0,
+ y: position.position,
+ animated: false,
+ });
+ setFirstLayout(false);
+ }
+ }, // eslint-disable-next-line react-hooks/exhaustive-deps
+ [],
+ );
const hideHeader = () => {
if (!hidden) {
diff --git a/src/screens/source/SourceScreen.js b/src/screens/source/SourceScreen.js
index 6502d3d9..d588e93e 100644
--- a/src/screens/source/SourceScreen.js
+++ b/src/screens/source/SourceScreen.js
@@ -75,11 +75,14 @@ const SourceScreen = ({navigation, route}) => {
}
};
- const checkIFInLibrary = (sourceId, novelUrl) =>
- library.some(obj => obj.novelUrl === novelUrl && obj.sourceId === sourceId);
+ const checkIFInLibrary = (novelSourceId, novelUrl) =>
+ library.some(
+ obj => obj.novelUrl === novelUrl && obj.sourceId === novelSourceId,
+ );
useEffect(() => {
getNovels();
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [page]);
const getNextPage = () => {
diff --git a/src/screens/updates/UpdatesScreen.js b/src/screens/updates/UpdatesScreen.js
index 08a9c9b8..4af117f8 100644
--- a/src/screens/updates/UpdatesScreen.js
+++ b/src/screens/updates/UpdatesScreen.js
@@ -24,7 +24,6 @@ import {
deleteChapterAction,
downloadChapterAction,
} from '../../redux/novel/novel.actions';
-import {showToast} from '../../hooks/showToast';
const Updates = ({navigation}) => {
const theme = useTheme();
@@ -43,11 +42,7 @@ const Updates = ({navigation}) => {
let sectionedUpdates = [];
- if (updates.length && updates[0].data !== undefined) {
- sectionedUpdates = updates;
- } else {
- showToast('Update your library to show updates.');
- }
+ sectionedUpdates = updates.length && updates[0].data !== undefined && updates;
useFocusEffect(
useCallback(() => {
diff --git a/src/services/backup/BackupQueries.js b/src/services/backup/BackupQueries.js
index 4eb67be2..1cb97bfb 100644
--- a/src/services/backup/BackupQueries.js
+++ b/src/services/backup/BackupQueries.js
@@ -10,7 +10,9 @@ const getLibraryNovels = () => {
getLibraryNovelsQuery,
null,
(txObj, {rows: {_array}}) => resolve(_array),
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
}),
);
@@ -26,7 +28,9 @@ const getLibraryChapters = () => {
getLibraryChaptersQuery,
null,
(txObj, {rows: {_array}}) => resolve(_array),
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
}),
);
@@ -42,7 +46,9 @@ const getLibraryDownloads = () => {
getLibraryDownloadsQuery,
null,
(txObj, {rows: {_array}}) => resolve(_array),
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
}),
);
@@ -72,7 +78,9 @@ const restoreNovels = async novel => {
novel.unread,
],
(txObj, res) => {},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
),
);
};
@@ -106,7 +114,9 @@ const restoreChapters = async chapter => {
downloaded,
],
(txObj, res) => {},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
),
);
};
@@ -122,7 +132,9 @@ const restoreDownloads = async chapter => {
restoreDownloadsQuery,
[downloadChapterId, chapterName, chapterText],
(txObj, res) => {},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
),
);
};
diff --git a/src/services/updates.js b/src/services/updates.js
index 86cdb7e9..d710f9c9 100644
--- a/src/services/updates.js
+++ b/src/services/updates.js
@@ -34,7 +34,9 @@ const updateNovelDetails = async (novel, novelId) => {
novelId,
],
(txObj, res) => {},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
);
});
};
@@ -62,11 +64,15 @@ export const updateNovel = async (sourceId, novelUrl, novelId) => {
// novelId
// );
},
- (txOBJ, error) => console.log('Error ', error),
+ (txOBJ, error) => {
+ // console.log('Error ', error)
+ },
);
}
},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
),
);
});
@@ -89,18 +95,23 @@ export const updateNovelChapters = async (
[chapter.chapterUrl, chapter.chapterName, chapter.releaseDate, novelId],
(txObj, {insertId}) => {
if (insertId !== -1) {
- downloadNewChapters &&
+ if (downloadNewChapters) {
downloadChapter(sourceId, novelUrl, chapter.chapterUrl, insertId);
+ }
tx.executeSql(
"INSERT OR IGNORE INTO updates (chapterId, novelId, updateTime) values (?, ?, (datetime('now','localtime')))",
[insertId, novelId],
(txOBJ, res) => {},
- (txOBJ, error) => console.log('Error ', error),
+ (txOBJ, error) => {
+ // console.log('Error ', error)
+ },
);
}
},
- (txObj, error) => console.log('Error ', error),
+ (txObj, error) => {
+ // console.log('Error ', error)
+ },
),
);
});
diff --git a/src/sources/es/novelawuxia.js b/src/sources/es/novelawuxia.js
index 9973bce3..1ae86ed0 100644
--- a/src/sources/es/novelawuxia.js
+++ b/src/sources/es/novelawuxia.js
@@ -147,7 +147,7 @@ const parseNovelAndChapters = async novelUrl => {
};
const parseChapter = async (novelUrl, chapterUrl) => {
- const url = `${baseUrl}${year}/${month}/${chapterUrl}`;
+ const url = `${baseUrl}${novelUrl}/${chapterUrl}`;
const result = await fetch(url);
const body = await result.text();