Skip to content
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

Not saving certain preferences / client not sending full preference data (fontSize, color, etc) #82

Closed
xenithorb opened this issue Feb 24, 2018 · 4 comments

Comments

@xenithorb
Copy link

xenithorb commented Feb 24, 2018

Versions:

Nexcloud 13.0.0.14
PHP 7.1.13 (cli) (built: Jan  3 2018 11:00:58) ( NTS )
nginx version: nginx/1.13.8
files_reader 1.2.2

At present it seems impossible to save the fontSize preference, here's the object it's sending:

{
    "name": "activeStyles",
    "scope": "epubreader",
    "lastModified": "1519504848116149",
    "id": 2,
    "value": {
        "fontSize": true,
        "nightMode": true
    },
    "fileId": "0"
}

As far as I can tell it's not sending the server any information about the 104% that I set?

A similar object (basically the same) is sent when trying to change one of the colors:

{
    "name": "activeStyles",
    "scope": "epubreader",
    "lastModified": "1519506517447194",
    "id": 2,
    "value": {
        "fontSize": true,
        "nightMode": true
    },
    "fileId": "0"
}

Which is also not being saved. Are font size and custom colors supposed to save? ... The fact that it emits this in the first place kind of indicates that it should.

Originally copied from #81 as a new bug was discovered

@Yetangitu
Copy link
Owner

OK, I found the cause and fixed it ('the case of the missing setDefault'), change will be in the next release coming up R.S.N.

Yetangitu added a commit that referenced this issue Feb 24, 2018
 - (#76) typo plus some missing code kept Reader from being used to preview shared files
 - (#79) typo kept Reader from being used by default for CBx
 - (#82) missing setDefault kept actual style settings from being saved
@Yetangitu
Copy link
Owner

Fixed in v1.2.3

BTW, these settings are defaults, they apply to all files opened with the EPUB renderer. There currently is no option to save these per-file. Maybe there should be?

@xenithorb
Copy link
Author

xenithorb commented Feb 25, 2018

I could see there being a per-file use case... example would be what I'm currently reading.... It needs to have the default font because it doesn't render properly without it for some reason, and if I force a certain font for the reading aspects, like Serif, then the code blocks look all serif-y then, which is not desirable. So for this book I explicitly want to set it to be whatever font the book says it's supposed to be (i.e. unset any font preferences). In other cases, I probably want a default Serif font of some sort if say, it's a novel or something.. Where i'm not necessarily worried about the internal structure of the words on the page (as with code blocks).

This fix should do for now though, as long as it saves that's fine. For the most part I read one thing at a time, so it's not really that big of a deal for me.

@xenithorb
Copy link
Author

Yay! Tested on my updated Nextcloud server, both of my problems have been solved and preferences are now saved. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants