-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reader Pageination #733
Reader Pageination #733
Conversation
package-lock.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these changes expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry, I found some problems after converting the PR from the draft and forgot to convert it back into a draft. I haven't removed most of these yet because I wanted to look it over again but didn't have the time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And about package-lock I don't really know what is wrong with it on my PC. I always have to delete it and reinstall all packages since something doesn't work with the linking of expo-core.
src/screens/reader/ReaderScreen.js
Outdated
const scrollTo = useCallback( | ||
offsetY => { | ||
offset => { | ||
console.log('offset', offset); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log('offset', offset); |
src/screens/reader/ReaderScreen.js
Outdated
const scrollToSavedProgress = useCallback(() => { | ||
console.log(position); | ||
scrollTo(position?.position); | ||
}, []); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const scrollToSavedProgress = useCallback(() => { | |
console.log(position); | |
scrollTo(position?.position); | |
}, []); | |
const scrollToSavedProgress = useCallback( | |
() => scrollTo(position?.position), | |
[], | |
); |
verticalSeekbar: boolean; | ||
readerPages: boolean; | ||
percentage?: number; | ||
scrollTo: (offset: number, axis: 'Y' | 'X') => void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is axis being used?
theme, | ||
minScroll = 0, | ||
minScroll = 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we already have this readerPages ? 1 : Math.round(minScroll)
.
minScroll = 1, | |
minScroll = 0, |
@@ -121,92 +129,26 @@ const WebViewReader: React.FC<WebViewReaderProps> = props => { | |||
minScroll.current = (layoutHeight / contentHeight) * 100; | |||
} | |||
break; | |||
case 'pages': | |||
console.log(event.data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log(event.data); |
strings/languages/en/strings.json
Outdated
@@ -95,6 +95,7 @@ | |||
"showBatteryAndTime": "Show battery and time", | |||
"showProgressPercentage": "Show progress percentage", | |||
"swipeGestures": "Swipe left or right to navigate between chapters", | |||
"readerPages": "Tap left or right to navigate through pages in the reader", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could add this till all the not working stuff is implemented.
"readerPages": "Tap left or right to navigate through pages in the reader", | |
"readerPages": "Tap left or right to navigate through pages in the reader (Experimental)", |
d13ad76
to
2bb166e
Compare
@rajarsheechatterjee Mind taking another look at it. Found some time to update the PR. I have been using this feature quite a bit and it works pretty well. |
@CD-Z I'll review it this weekend. Could you rebase the PR if possible? All the other commits are also present in the git diff which would make it harder to review. |
7b54ec6
to
e06f513
Compare
@rajarsheechatterjee No problem, fixed the rebase. |
#right, #middle { | ||
position: absolute; | ||
height: 100%; | ||
width: 35%; | ||
top: 0; | ||
z-index: 20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
user will not be able to select text from reader, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, but they can't now either.
also, you should make a function to convert |
working:
not working:
Screen_Recording_20230811_215957_LNReader.mp4