-
Notifications
You must be signed in to change notification settings - Fork 55
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
Update reader width live when updating in reader view #581
Update reader width live when updating in reader view #581
Conversation
edc0b3d
to
d3b9a0e
Compare
not sure if that is fixable with the way the reader and reader settings are implemented, but it does feel kinda laggy (if you look at the slider compared to the mouse position) |
1df2eb8
to
70b879c
Compare
@schroda Okay I took another stab, added |
70b879c
to
841d2b9
Compare
841d2b9
to
1e1b287
Compare
Pushed after rebasing and fixing what I could so I can get a re-review, but need to test things again. |
1e1b287
to
6be1e0e
Compare
Ok should be good, I tested and it seems to be working as expected. |
6be1e0e
to
42305ff
Compare
Basically, instead of updating the width of the image after clicking `ok`, the width is adjusted live, which makes it easier to figure out the right value for the manga being viewed. While implementing this, I realized we can't update the backend every time we re-render when `liveUpdate` is true, so I've updated the logic for persisting settings to support skipping the API call to save the settings in the backend, and only perform the API it when the user clicks ok on the number setting. Signed-off-by: Chance Zibolski <[email protected]>
42305ff
to
27b8e91
Compare
Basically, instead of updating the width of the image after clicking
ok
, the width is adjusted live, which makes it easier to figure out the right value for the manga being viewed.Ideally we could revert the changes with the
cancel
button, but to do that requires tracking the value prior to the updates. With how the reader is designed currently, everything is usingsettings
directly and so it's tricky to separate the settings being used to draw the component and the settings that are saved. So instead I've disabled the cancel button whenliveUpdate
is true, since settings are updated immediately.While implementing this, I realized we can't update the backend every time we re-render when
liveUpdate
is true, so I've updated the logic for persisting settings to support skipping the API call to save the settings in the backend, and only perform the API it when the user clicks ok on the number setting.