Add standalone Reading Mode for mobile - #259
AbeJellinek wants to merge 2 commits into
Conversation
Should be fine, because sort indexes synced from desktop also have the same issue. Note: There’s a bug where |
That sounds good, should work just fine. |
|
@AbeJellinek one possible blocker is I got Otherwise when fixed can we merge it? |
|
Indeed... sorry about that! Try again now. |
Seems to be working fine now! Even rendering images is fine. I may raise some smaller bugs later, but this is good to merge now. Actually, I found another issue: only pdf-view.js and epub-view.ts emit outlinePath, SDTView._updateViewStats doesn't (viewStats don't contain outlinePath in reading mode), so the outline in sidebar doesn't get selected as I'm scrolling the document. I can see the same in desktop app. But since we have outline available, shouldn't this be available as well? One slightly weird thing is that onChangeViewStats are not sent as the user is scrolling, so current page updates only after the scrolling stops completely. In epub reader it's not so apparent because it updates after page change, but since reading mode has smooth scrolling, it's quite visible that pages don't change, only after it completely stops. |
Only supports PDF, since snapshots will have an underlying reader.
PDF annotation sort indexes won't always be exactly the same here because we don't have pdf.js, so we're using post-normalization character counts from SDT. @mrtcode, is that an issue?
@michalrentka, the app will need to listen for
onRequestPageRegionImagesand then callsetPageRegionImageswith the result (a data URL). Seeindex.ios.jsfor the signatures.