mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-24 23:46:41 +02:00
Autoformat changes
This commit is contained in:
parent
0ac3996443
commit
e7d33c6749
2 changed files with 21 additions and 16 deletions
36
src/app.rs
36
src/app.rs
|
@ -1,4 +1,4 @@
|
|||
use crate::color::{TColor};
|
||||
use crate::color::TColor;
|
||||
|
||||
use std::cmp::Ordering;
|
||||
use std::convert::TryInto;
|
||||
|
@ -369,20 +369,26 @@ impl TTApp {
|
|||
let ctasks = self.tasks.clone();
|
||||
let blocking = self.colors.blocking;
|
||||
let blocked = self.colors.blocked;
|
||||
let rows = tasks
|
||||
.iter()
|
||||
.enumerate()
|
||||
.map(|(i, val)|
|
||||
if ctasks[i].tags().unwrap_or(&vec![]).join(" ").contains(&"BLOCKED".to_string()) {
|
||||
Row::StyledData(val.iter(), normal_style)
|
||||
} else if ctasks[i].tags().unwrap_or(&vec![]).contains(&"BLOCKING".to_string()) {
|
||||
Row::StyledData(val.iter(), normal_style.fg(blocking))
|
||||
} else if ctasks[i].due().is_some() {
|
||||
Row::StyledData(val.iter(), normal_style)
|
||||
} else {
|
||||
Row::StyledData(val.iter(), normal_style)
|
||||
}
|
||||
);
|
||||
let rows = tasks.iter().enumerate().map(|(i, val)| {
|
||||
if ctasks[i]
|
||||
.tags()
|
||||
.unwrap_or(&vec![])
|
||||
.join(" ")
|
||||
.contains(&"BLOCKED".to_string())
|
||||
{
|
||||
Row::StyledData(val.iter(), normal_style)
|
||||
} else if ctasks[i]
|
||||
.tags()
|
||||
.unwrap_or(&vec![])
|
||||
.contains(&"BLOCKING".to_string())
|
||||
{
|
||||
Row::StyledData(val.iter(), normal_style.fg(blocking))
|
||||
} else if ctasks[i].due().is_some() {
|
||||
Row::StyledData(val.iter(), normal_style)
|
||||
} else {
|
||||
Row::StyledData(val.iter(), normal_style)
|
||||
}
|
||||
});
|
||||
let constraints: Vec<Constraint> = widths
|
||||
.iter()
|
||||
.map(|i| {
|
||||
|
|
|
@ -345,7 +345,6 @@ impl TColor {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::color::TColor;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue