Fixes
This commit is contained in:
@ -190,17 +190,6 @@ func (m *Model) parseRowStyles(rows taskwarrior.Tasks) []lipgloss.Style {
|
||||
styles[i] = m.common.Styles.Recurring.Inherit(m.styles.Cell).Margin(m.styles.Cell.GetMargin()).Padding(m.styles.Cell.GetPadding())
|
||||
continue
|
||||
}
|
||||
// TOOD: move udas to proper location
|
||||
if len(m.common.Udas) > 0 {
|
||||
for _, uda := range m.common.Udas {
|
||||
if u, ok := task.Udas[uda]; ok {
|
||||
if style, ok := m.common.Styles.Colors[fmt.Sprintf("uda.%s.%s", uda, u)]; ok {
|
||||
styles[i] = style.Inherit(m.styles.Cell).Margin(m.styles.Cell.GetMargin()).Padding(m.styles.Cell.GetPadding())
|
||||
}
|
||||
}
|
||||
}
|
||||
continue
|
||||
}
|
||||
// TODO: make styles optional and discard if empty
|
||||
if len(task.Tags) > 0 {
|
||||
styles[i] = m.common.Styles.Tagged.Inherit(m.styles.Cell).Margin(m.styles.Cell.GetMargin()).Padding(m.styles.Cell.GetPadding())
|
||||
@ -213,6 +202,16 @@ func (m *Model) parseRowStyles(rows taskwarrior.Tasks) []lipgloss.Style {
|
||||
}
|
||||
continue
|
||||
}
|
||||
if len(m.common.Udas) > 0 {
|
||||
for _, uda := range m.common.Udas {
|
||||
if u, ok := task.Udas[uda]; ok {
|
||||
if style, ok := m.common.Styles.Colors[fmt.Sprintf("uda.%s.%s", uda, u)]; ok {
|
||||
styles[i] = style.Inherit(m.styles.Cell).Margin(m.styles.Cell.GetMargin()).Padding(m.styles.Cell.GetPadding())
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
styles[i] = m.common.Styles.Base.Inherit(m.styles.Cell).Margin(m.styles.Cell.GetMargin()).Padding(m.styles.Cell.GetPadding())
|
||||
}
|
||||
return styles
|
||||
|
||||
Reference in New Issue
Block a user