summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rhlibrary/jingle_selector_widget.go23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/rhlibrary/jingle_selector_widget.go b/src/rhlibrary/jingle_selector_widget.go
index fa8bdbf..289ce97 100644
--- a/src/rhlibrary/jingle_selector_widget.go
+++ b/src/rhlibrary/jingle_selector_widget.go
@@ -289,23 +289,30 @@ func updateJingleCutListRows(jingle rddb.JingleListEntry, db *rddb.DB, p *player
jinglesCutList.SetHExpand(true)
jinglesCutList.SetVExpand(true)
- activeCart, inactiveCart, err := db.GetJingleCutList(jingle)
+ cart, err := db.GetJingleCutList(jingle)
if err != nil {
return err
}
idx := 1
+ hasInactiveCuts := false
addJingleCutListHead(idx)
- for _, cut := range activeCart.Cuts {
- idx++
- addJingleCutListEntry(idx, activeCart.Number, cut, p)
+ for _, cut := range cart.Cuts {
+ if !cut.Evergreen {
+ idx++
+ addJingleCutListEntry(idx, cart.Number, cut, p)
+ } else {
+ hasInactiveCuts = true
+ }
}
- if len(inactiveCart.Cuts) > 0 {
+ if hasInactiveCuts {
idx++
addJingleCutListSpacer(idx)
- for _, cut := range inactiveCart.Cuts {
- idx++
- addJingleCutListEntry(idx, inactiveCart.Number, cut, p)
+ for _, cut := range cart.Cuts {
+ if cut.Evergreen {
+ idx++
+ addJingleCutListEntry(idx, cart.Number, cut, p)
+ }
}
}