Allow overriding individual file type's refresh rates#323
Closed
videah wants to merge 2 commits intobaskerville:masterfrom
Closed
Allow overriding individual file type's refresh rates#323videah wants to merge 2 commits intobaskerville:masterfrom
videah wants to merge 2 commits intobaskerville:masterfrom
Conversation
baskerville
requested changes
Sep 7, 2023
contrib/Settings-sample.toml
Outdated
| inverted = 2 | ||
|
|
||
| # Override the refresh rate for individual file types. | ||
| [reader.refresh-rate.file-types] |
Owner
There was a problem hiding this comment.
The Settings-sample.toml file needs to match the default values.
contrib/Settings-sample.toml
Outdated
|
|
||
| # Override the refresh rate for individual file types. | ||
| [reader.refresh-rate.file-types] | ||
| epub = { regular = 8, inverted = 2 } |
Owner
There was a problem hiding this comment.
The defaults are already this, so the epub key is useless.
crates/core/src/settings/mod.rs
Outdated
| pub struct RefreshRateSettings { | ||
| pub regular: u8, | ||
| pub inverted: u8, | ||
| pub file_types: HashMap<String, RefreshRateSettings>, |
Owner
There was a problem hiding this comment.
Would it be possible for RefreshRateSettings to be non-recursive?
We use the term kind instead of type (a reserved word) as you can see elsewhere in this file.
This new attribute shouldn't be serialized if empty.
Contributor
Author
|
Included the necessary tweaks, I've made it so the default has CBZ files refreshing every page since it seems like a sane default to me and exposes the functionality in Settings-sample.toml |
baskerville
approved these changes
Sep 14, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new setting to change the refresh rate based on a documents file type.
The motivation for this is that I prefer partial refreshes for text heavy content like .epub's but want full refreshes for .cbz to prevent ghosting from comic/manga panels.