Minor cleanup

This commit is contained in:
Rajarshee Chatterjee
2021-03-09 15:13:09 +05:30
parent a3414ac85d
commit 5f01dcd7e9
8 changed files with 21 additions and 48 deletions
+2 -2
View File
@@ -92,8 +92,8 @@ const styles = StyleSheet.create({
borderRadius: 4,
},
opac: {
paddingHorizontal: 3,
paddingVertical: 3,
paddingHorizontal: 3.5,
paddingVertical: 3.5,
borderRadius: 4,
},
});
+3 -3
View File
@@ -21,7 +21,7 @@ const ChapterCard = ({
<TouchableRipple
style={{
paddingHorizontal: 15,
paddingVertical: 9,
paddingVertical: 7,
flexDirection: "row",
justifyContent: "space-between",
alignItems: "center",
@@ -76,7 +76,7 @@ const ChapterCard = ({
downloading.chapterUrl === chapter.chapterUrl ? (
<ActivityIndicator
color={theme.textColorHintDark}
size={26}
size={25}
style={{ margin: 3.5, padding: 5 }}
/>
) : (
@@ -92,7 +92,7 @@ const ChapterCard = ({
? theme.textColorPrimaryDark
: theme.textColorHintDark
}
size={26}
size={25}
onPress={() => {
downloadChapter(
downloaded ? 1 : 0,
+1 -1
View File
@@ -286,7 +286,7 @@ const NovelInfoHeader = ({
flexDirection: "row",
justifyContent: "space-between",
alignItems: "center",
paddingRight: 15,
paddingRight: 12.5,
}}
onPress={() =>
bottomSheetRef.current.show({ velocity: -1.5 })
-2
View File
@@ -309,8 +309,6 @@ export default ChapterItem;
const styles = StyleSheet.create({
container: {
flexGrow: 1,
// backgroundColor: "#202125",
// backgroundColor: "#000000",
paddingHorizontal: 10,
paddingVertical: 10,
},
+5 -2
View File
@@ -1,8 +1,11 @@
import React from "react";
import { List, Divider } from "react-native-paper";
import * as Linking from "expo-linking";
import { List, Divider } from "react-native-paper";
import { CustomAppbar } from "../../components/common/Appbar";
import { useSelector } from "react-redux";
const AboutScreen = ({ navigation }) => {
const theme = useSelector((state) => state.themeReducer.theme);
@@ -24,7 +27,7 @@ const AboutScreen = ({ navigation }) => {
titleStyle={{ color: theme.textColorPrimaryDark }}
title="Version"
descriptionStyle={{ color: theme.textColorSecondaryDark }}
description="Stable 1.0.16 (refactor: project structure)"
description="Stable 1.0.17"
/>
<List.Item
titleStyle={{ color: theme.textColorPrimaryDark }}
+6 -14
View File
@@ -5,9 +5,11 @@ import { List } from "react-native-paper";
import { CustomAppbar } from "../../components/common/Appbar";
import { connect } from "react-redux";
import { useSelector } from "react-redux";
const MoreScreen = ({ navigation }) => {
const theme = useSelector((state) => state.themeReducer.theme);
const MoreScreen = ({ navigation, theme }) => {
return (
<>
<CustomAppbar title="More" />
@@ -46,16 +48,6 @@ const MoreScreen = ({ navigation, theme }) => {
);
};
const mapStateToProps = (state) => ({
theme: state.themeReducer.theme,
});
export default MoreScreen;
export default connect(mapStateToProps)(MoreScreen);
const styles = StyleSheet.create({
container: {
flex: 1,
// backgroundColor: "#202125",
backgroundColor: "#000000",
},
});
const styles = StyleSheet.create({});
+4 -22
View File
@@ -24,10 +24,11 @@ import {
downloadOrDeleteChapter,
} from "../services/db";
import { connect } from "react-redux";
import { useSelector } from "react-redux";
const NovelItem = ({ route, navigation, theme }) => {
const NovelItem = ({ route, navigation }) => {
const item = route.params;
const theme = useSelector((state) => state.themeReducer.theme);
const {
extensionId,
@@ -188,21 +189,6 @@ const NovelItem = ({ route, navigation, theme }) => {
return (
<Provider>
{/* <Appbar.Header style={{ backgroundColor: theme.colorDarkPrimary }}>
<Appbar.BackAction
onPress={() => {
navigation.goBack();
}}
color={"white"}
size={26}
style={{ marginRight: 0 }}
/>
<Appbar.Content
title={item.novelName}
titleStyle={{ color: theme.textColorPrimaryDark }}
/>
</Appbar.Header> */}
<View
style={[
styles.container,
@@ -257,11 +243,7 @@ const NovelItem = ({ route, navigation, theme }) => {
);
};
const mapStateToProps = (state) => ({
theme: state.themeReducer.theme,
});
export default connect(mapStateToProps)(NovelItem);
export default NovelItem;
const styles = StyleSheet.create({
container: {
@@ -181,7 +181,5 @@ export const BottomSheet = ({
const styles = StyleSheet.create({
contentContainer: {
flex: 1,
// paddingTop: ,
// alignItems: "center",
},
});