More maintainable caps config

The idea here is that we preserve client's config as is, without
changes. This gets rid of state!
This commit is contained in:
Aleksey Kladov
2021-01-05 16:57:05 +03:00
parent c8d3d5694b
commit 624eb1ee54
6 changed files with 124 additions and 83 deletions

View File

@@ -46,7 +46,7 @@ impl GlobalState {
message: Option<String>,
fraction: Option<f64>,
) {
if !self.config.client_caps.work_done_progress {
if !self.config.work_done_progress() {
return;
}
let percentage = fraction.map(|f| {