Fix chapter header
This commit is contained in:
@@ -24,7 +24,7 @@ const ChapterBottomSheet = ({
|
||||
style={[
|
||||
styles.contentContainer,
|
||||
{
|
||||
backgroundColor: "rgba(0,0,0,0.5)",
|
||||
backgroundColor: "rgba(0,0,0,0.4)",
|
||||
},
|
||||
]}
|
||||
>
|
||||
|
||||
@@ -12,7 +12,7 @@ const ChapterCard = ({
|
||||
}) => (
|
||||
<TouchableRipple
|
||||
style={{
|
||||
marginHorizontal: 15,
|
||||
paddingHorizontal: 15,
|
||||
paddingVertical: 7,
|
||||
flexDirection: "row",
|
||||
justifyContent: "space-between",
|
||||
|
||||
+22
-21
@@ -152,13 +152,12 @@ const ChapterItem = ({ route, navigation }) => {
|
||||
|
||||
return (
|
||||
<Provider>
|
||||
<StatusBar backgroundColor="transparent" />
|
||||
<CollapsibleHeaderScrollView
|
||||
headerContainerBackgroundColor={"rgba(0,0,0,0)"}
|
||||
headerContainerBackgroundColor={"rgba(0,0,0,0.4)"}
|
||||
CollapsibleHeaderComponent={
|
||||
<Appbar.Header
|
||||
style={{
|
||||
backgroundColor: "rgba(0,0,0,0.2)",
|
||||
backgroundColor: "transparent",
|
||||
elevation: 0,
|
||||
}}
|
||||
>
|
||||
@@ -253,24 +252,26 @@ const ChapterItem = ({ route, navigation }) => {
|
||||
/>
|
||||
</View>
|
||||
) : (
|
||||
<Text
|
||||
style={[
|
||||
{
|
||||
paddingVertical: 15,
|
||||
fontSize: size,
|
||||
},
|
||||
readerTheme === 1
|
||||
? { color: theme.textColorSecondaryDark }
|
||||
: { color: "black" },
|
||||
size === 16
|
||||
? { lineHeight: 25 }
|
||||
: size === 20
|
||||
? { lineHeight: 28 }
|
||||
: size === 12 && { lineHeight: 20 },
|
||||
]}
|
||||
>
|
||||
{chapter.chapterText.trim()}
|
||||
</Text>
|
||||
<>
|
||||
<Text
|
||||
style={[
|
||||
{
|
||||
paddingVertical: 15,
|
||||
fontSize: size,
|
||||
},
|
||||
readerTheme === 1
|
||||
? { color: theme.textColorSecondaryDark }
|
||||
: { color: "black" },
|
||||
size === 16
|
||||
? { lineHeight: 25 }
|
||||
: size === 20
|
||||
? { lineHeight: 28 }
|
||||
: size === 12 && { lineHeight: 20 },
|
||||
]}
|
||||
>
|
||||
{chapter.chapterText.trim()}
|
||||
</Text>
|
||||
</>
|
||||
)}
|
||||
<Portal>
|
||||
<BottomSheet
|
||||
|
||||
+20
-14
@@ -46,18 +46,22 @@ const NovelItem = ({ route, navigation }) => {
|
||||
)
|
||||
.then((response) => response.json())
|
||||
.then((json) => {
|
||||
insertIntoDb(
|
||||
{
|
||||
novelSummary: json.novelSummary,
|
||||
"Author(s)": json["Author(s)"],
|
||||
"Genre(s)": json["Genre(s)"],
|
||||
Status: json.Status,
|
||||
sourceUrl: json.sourceUrl,
|
||||
source: json.sourceName,
|
||||
},
|
||||
json.novelChapters
|
||||
);
|
||||
checkIfExistsInDb();
|
||||
let novelObj = {
|
||||
novelSummary: json.novelSummary,
|
||||
"Author(s)": json["Author(s)"],
|
||||
"Genre(s)": json["Genre(s)"],
|
||||
Status: json.Status,
|
||||
sourceUrl: json.sourceUrl,
|
||||
source: json.sourceName,
|
||||
unread: 1,
|
||||
lastRead: json.novelChapters[0].chapterUrl,
|
||||
lastReadName: json.novelChapters[0].chapterName,
|
||||
};
|
||||
setNovel(novelObj);
|
||||
setChapters(json.novelChapters);
|
||||
setLoading(false);
|
||||
setRefreshing(false);
|
||||
insertIntoDb(novelObj, json.novelChapters);
|
||||
console.log("Setdb");
|
||||
})
|
||||
.catch((error) => console.error(error));
|
||||
@@ -92,8 +96,8 @@ const NovelItem = ({ route, navigation }) => {
|
||||
nov["Genre(s)"],
|
||||
nov.Status,
|
||||
extensionId,
|
||||
chaps[0].chapterUrl,
|
||||
chaps[0].chapterName,
|
||||
nov.lastRead,
|
||||
nov.lastReadName,
|
||||
nov.sourceUrl,
|
||||
nov.source,
|
||||
],
|
||||
@@ -103,6 +107,8 @@ const NovelItem = ({ route, navigation }) => {
|
||||
(txObj, error) => console.log("Error ", error)
|
||||
);
|
||||
|
||||
// console.log(chaps[0]);
|
||||
|
||||
// Insert chapters into database
|
||||
chaps.map((chap) =>
|
||||
tx.executeSql(
|
||||
|
||||
Reference in New Issue
Block a user