Skip to content

Commit

Permalink
Merge branch 'LNReader:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Palloxin authored Nov 26, 2024
2 parents 195e70f + 4bcd22b commit 57102dd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/hooks/persisted/useNovel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export const useNovel = (novelPath: string, pluginId: string) => {
pages[pageIndex],
).then(chapters => setChapters(chapters));
}
}, [novel, pageIndex]);
}, [novel, pageIndex, sort, novelSettings]);

const sortAndFilterChapters = async (sort?: string, filter?: string) => {
if (novel) {
Expand Down
22 changes: 9 additions & 13 deletions src/screens/novel/components/EditInfoModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,7 @@ const EditInfoModal = ({
});
};

const status = [
NovelStatus.Ongoing,
NovelStatus.OnHiatus,
NovelStatus.Completed,
NovelStatus.Unknown,
NovelStatus.Cancelled,
];
const status = Object.values(NovelStatus);

return (
<Portal>
Expand Down Expand Up @@ -93,7 +87,9 @@ const EditInfoModal = ({
<Pressable
style={{
backgroundColor:
novel.status === item ? theme.rippleColor : 'transparent',
novelInfo.status === item
? theme.rippleColor
: 'transparent',
paddingVertical: 6,
paddingHorizontal: 12,
}}
Expand All @@ -105,7 +101,7 @@ const EditInfoModal = ({
<Text
style={{
color:
novel.status === item
novelInfo.status === item
? theme.primary
: theme.onSurfaceVariant,
}}
Expand Down Expand Up @@ -190,10 +186,10 @@ const EditInfoModal = ({

{novelInfo.genres !== undefined && novelInfo.genres !== '' ? (
<FlatList
contentContainerStyle={{ marginVertical: 8 }}
style={{ marginVertical: 8 }}
horizontal
data={novelInfo.genres?.split(',')}
keyExtractor={(item, index) => 'novelTag' + index}
keyExtractor={(_, index) => 'novelTag' + index}
renderItem={({ item }) => (
<GenreChip theme={theme} onPress={() => removeTag(item)}>
{item}
Expand Down Expand Up @@ -256,15 +252,15 @@ const GenreChip = ({
<Text
style={{
fontSize: 12,
color: theme.onSurfaceVariant,
color: theme.onSecondaryContainer,
textTransform: 'capitalize',
}}
>
{children}
</Text>
<MaterialCommunityIcons
name="close"
color={theme.primary}
color={theme.onSecondaryContainer}
size={18}
onPress={onPress}
style={{ marginLeft: 4 }}
Expand Down
5 changes: 4 additions & 1 deletion src/screens/novel/components/Tracker/TrackSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ const TrackSheet = ({ bottomSheetRef, novel, theme }: Props) => {

return (
<>
<BottomSheet bottomSheetRef={bottomSheetRef} snapPoints={[130, 200]}>
<BottomSheet
bottomSheetRef={bottomSheetRef}
snapPoints={trackedNovel ? [180] : [130]}
>
<View
style={[
styles.contentContainer,
Expand Down

0 comments on commit 57102dd

Please sign in to comment.