fix: Remove Text Selectable Option (Closes #332)

This commit is contained in:
Rajarshee Chatterjee
2022-07-30 08:09:32 +05:30
parent 4d446d7c0b
commit c02a72018d
5 changed files with 2 additions and 19 deletions
-1
View File
@@ -122,7 +122,6 @@ export const initialState = {
autoScroll: false,
autoScrollInterval: 10,
autoScrollOffset: null,
textSelectable: false,
verticalSeekbar: true,
removeExtraParagraphSpacing: false,
-2
View File
@@ -79,7 +79,6 @@ const Chapter = ({ route, navigation }) => {
const {
swipeGestures = false,
incognitoMode = false,
textSelectable = false,
useWebViewForChapter = false,
wvUseNewSwipes = false,
wvShowSwipeMargins = true,
@@ -469,7 +468,6 @@ const Chapter = ({ route, navigation }) => {
text={chapterText}
reader={readerSettings}
chapterName={chapter.chapterName || chapterName}
textSelectable={textSelectable}
theme={theme}
nextChapter={nextChapter}
navigateToNextChapter={navigateToNextChapter}
@@ -48,7 +48,6 @@ const GeneralTab: React.FC = () => {
showScrollPercentage,
wvUseVolumeButtons = false,
swipeGestures = false,
textSelectable,
removeExtraParagraphSpacing = false,
} = useSettingsV1();
@@ -125,16 +124,7 @@ const GeneralTab: React.FC = () => {
value={removeExtraParagraphSpacing}
theme={theme}
/>
{!useWebViewForChapter ? (
<ReaderSheetPreferenceItem
label={getString('readerScreen.bottomSheet.allowTextSelection')}
onPress={() =>
dispatch(setAppSettings('textSelectable', !textSelectable))
}
value={textSelectable}
theme={theme}
/>
) : (
{useWebViewForChapter ? (
<ReaderSheetPreferenceItem
label={'Volume buttons scroll'}
onPress={() =>
@@ -143,7 +133,7 @@ const GeneralTab: React.FC = () => {
value={wvUseVolumeButtons}
theme={theme}
/>
)}
) : null}
</View>
);
};
@@ -30,7 +30,6 @@ interface TextReaderProps {
};
chapterName: string;
nextChapter: ChapterItem;
textSelectable: boolean;
navigateToNextChapter: () => void;
onPress(): void;
}
@@ -41,7 +40,6 @@ const TextReader: React.FC<TextReaderProps> = ({
reader,
chapterName,
nextChapter,
textSelectable,
navigateToNextChapter,
onPress,
}) => {
@@ -61,7 +59,6 @@ const TextReader: React.FC<TextReaderProps> = ({
fontSize: reader.textSize,
textAlign: reader.textAlign as TextAlignments,
},
selectable: textSelectable,
}}
defaultViewProps={{
style: {
@@ -32,7 +32,6 @@ type WebViewReaderProps = {
};
chapterName: string;
nextChapter: ChapterItem;
textSelectable: boolean;
navigateToNextChapter(): void;
navigateToPrevChapter(): void;
onPress(): void;