feat: Add Chapter Name Sort (Closes #525)

This commit is contained in:
Rajarshee Chatterjee
2023-03-05 11:12:43 +05:30
parent 1c21c180ab
commit 550e116be5
@@ -80,7 +80,13 @@ const ChaptersSettingsSheet = ({
<View style={{ flex: 1 }}>
<SortItem
label="By source"
status={sort === 'ORDER BY chapterId ASC' ? 'asc' : 'desc'}
status={
sort === 'ORDER BY chapterId ASC'
? 'asc'
: sort === 'ORDER BY chapterId DESC'
? 'desc'
: undefined
}
onPress={() =>
sort === 'ORDER BY chapterId ASC'
? sortChapters('ORDER BY chapterId DESC')
@@ -88,6 +94,22 @@ const ChaptersSettingsSheet = ({
}
theme={theme}
/>
<SortItem
label="By chapter name"
status={
sort === 'ORDER BY chapterName ASC'
? 'asc'
: sort === 'ORDER BY chapterName DESC'
? 'desc'
: undefined
}
onPress={() =>
sort === 'ORDER BY chapterName ASC'
? sortChapters('ORDER BY chapterName DESC')
: sortChapters('ORDER BY chapterName ASC')
}
theme={theme}
/>
</View>
);