diff --git a/app.json b/app.json index c4eca1cb9..2fd5b2d76 100644 --- a/app.json +++ b/app.json @@ -3,7 +3,7 @@ "name": "LNReader", "slug": "LNReader", "scheme": "lnreader", - "version": "1.0.14", + "version": "1.0.15", "orientation": "portrait", "icon": "./assets/icon.png", "splash": { diff --git a/src/redux/chapter/chapter.actions.js b/src/redux/chapter/chapter.actions.js index 208d01013..13dac596e 100644 --- a/src/redux/chapter/chapter.actions.js +++ b/src/redux/chapter/chapter.actions.js @@ -27,12 +27,9 @@ export const getChapterAction = ( ) => async (dispatch) => { dispatch({ type: CHAPTER_LOADING }); - const isDownloaded = await isChapterDownloaded(novelId); - let chapter; + let chapter = await getChapter(novelId); - if (isDownloaded) { - chapter = await getChapter(novelId); - } else { + if (!chapter) { chapter = await fetchChapter(extensionId, novelUrl, chapterUrl); } console.log(isDownloaded); diff --git a/src/screens/More/About.js b/src/screens/More/About.js index 130dd48b4..651869ad0 100644 --- a/src/screens/More/About.js +++ b/src/screens/More/About.js @@ -17,12 +17,12 @@ const AboutScreen = ({ navigation }) => { { right={tracker && "check"} theme={theme} /> - {tracker.expires_in < new Date(Date.now()) && ( + {tracker && tracker.expires_in < new Date(Date.now()) && ( <> diff --git a/src/screens/More/components/GridSizeModal.js b/src/screens/More/components/GridSizeModal.js index 9dbed4a89..c08df0308 100644 --- a/src/screens/More/components/GridSizeModal.js +++ b/src/screens/More/components/GridSizeModal.js @@ -2,6 +2,7 @@ import React from "react"; import { Text, StyleSheet } from "react-native"; import { Portal, Modal } from "react-native-paper"; import Slider from "@react-native-community/slider"; +import { RadioButton, RadioButtonGroup } from "../../../components/RadioButton"; const GridSizeModal = ({ itemsPerRow, @@ -10,6 +11,14 @@ const GridSizeModal = ({ setItemsPerRow, theme, }) => { + const gridSizes = { + 1: "XS", + 2: "S", + 3: "M", + 4: "L", + 5: "XL", + }; + return ( setItemsPerRow(value)} /> + {/* setItemsPerRow(value)} + value={itemsPerRow} + > + {Object.keys(gridSizes).map((item) => ( + + ))} + */} ); @@ -65,7 +87,7 @@ const styles = StyleSheet.create({ marginBottom: 10, }, modalDescription: { - marginBottom: 4, + marginBottom: 16, }, slider: { width: "100%", diff --git a/src/screens/Novel/components/NovelHeader.js b/src/screens/Novel/components/NovelHeader.js index e13509032..65ff60f56 100644 --- a/src/screens/Novel/components/NovelHeader.js +++ b/src/screens/Novel/components/NovelHeader.js @@ -31,6 +31,7 @@ const NovelInfoHeader = ({ const [downloadMenu, showDownloadMenu] = useState(false); + const tracker = useSelector((state) => state.trackerReducer.tracker); const trackedNovels = useSelector( (state) => state.trackerReducer.trackedNovels ); @@ -109,11 +110,13 @@ const NovelInfoHeader = ({ followed={novel.followed} novel={novel} /> - + {tracker && ( + + )} WebBrowser.openBrowserAsync(novel.sourceUrl) diff --git a/src/screens/Novel/components/Tracker/TrackSearchDialog.js b/src/screens/Novel/components/Tracker/TrackSearchDialog.js index 4ee345753..af6a2ec08 100644 --- a/src/screens/Novel/components/Tracker/TrackSearchDialog.js +++ b/src/screens/Novel/components/Tracker/TrackSearchDialog.js @@ -109,7 +109,8 @@ const TrackSearchDialog = ({ style={{ margin: 16 }} /> ) : ( - searchResults.data.length > 0 && + searchResults && + searchResults.data && searchResults.data.map((result) => renderSearchResultCard(result) ) diff --git a/src/screens/Novel/components/Tracker/TrackSheet.js b/src/screens/Novel/components/Tracker/TrackSheet.js index 51d0a183f..97c482d58 100644 --- a/src/screens/Novel/components/Tracker/TrackSheet.js +++ b/src/screens/Novel/components/Tracker/TrackSheet.js @@ -109,6 +109,7 @@ const TrackSheet = ({ bottomSheetRef, novelId, novelName, theme }) => { ref={bottomSheetRef} draggableRange={{ top: 120, bottom: 0 }} snappingPoints={[0, 120]} + backdropOpacity={0.25} >