Update documentation

This commit is contained in:
Dheepak Krishnamurthy 2021-07-27 12:02:34 -06:00
parent 102ca0ffa0
commit 5f9a32f2c6
3 changed files with 12 additions and 11 deletions

View file

@ -2124,7 +2124,7 @@ impl TaskwarriorTuiApp {
}
}
} else if input == self.keyconfig.delete {
if self.config.uda_prompt_on_delete {
if self.config.uda_task_report_prompt_on_delete {
self.mode = AppMode::TaskDeletePrompt;
if self.task_current().is_none() {
self.mode = AppMode::TaskReport;

View file

@ -65,7 +65,7 @@ pub struct Config {
pub uda_shortcuts: Vec<String>,
pub uda_background_process: String,
pub uda_background_process_period: usize,
pub uda_prompt_on_delete: bool,
pub uda_task_report_prompt_on_delete: bool,
}
impl Config {
@ -110,7 +110,7 @@ impl Config {
let uda_style_context_active = uda_style_context_active.unwrap_or_default();
let uda_style_report_completion_pane =
uda_style_report_completion_pane.unwrap_or_else(|| Style::default().bg(Color::Rgb(223, 223, 223)));
let uda_prompt_on_delete = Self::get_uda_prompt_on_delete(data);
let uda_task_report_prompt_on_delete = Self::get_uda_task_report_prompt_on_delete(data);
Ok(Self {
enabled,
@ -143,7 +143,7 @@ impl Config {
uda_shortcuts,
uda_background_process,
uda_background_process_period,
uda_prompt_on_delete,
uda_task_report_prompt_on_delete,
})
}
@ -451,6 +451,13 @@ impl Config {
.unwrap_or(true)
}
fn get_uda_task_report_prompt_on_delete(data: &str) -> bool {
Self::get_config("uda.taskwarrior-tui.task-report.prompt-on-delete", data)
.unwrap_or_default()
.get_bool()
.unwrap_or(false)
}
fn get_uda_selection_indicator(data: &str) -> String {
let indicator = Self::get_config("uda.taskwarrior-tui.selection.indicator", data);
match indicator {
@ -519,13 +526,6 @@ impl Config {
.unwrap_or(false)
}
fn get_uda_prompt_on_delete(data: &str) -> bool {
Self::get_config("uda.taskwarrior-tui.report.prompt-on-delete", data)
.unwrap_or_default()
.get_bool()
.unwrap_or(false)
}
fn get_uda_months_per_row(data: &str) -> usize {
Self::get_config("uda.taskwarrior-tui.calendar.months-per-row", data)
.unwrap_or_default()