Add Sport/Canada/US/AI/Cloud/HomeLab pills; drop Finance
- New Sport pill: detect sports by clear headline terms or majority sports-outlet sources, and exclude sports (and F1) from All/Tech/regions so World Cup/soccer no longer pollutes Finance/Tech. - New client keyword pills: Canada, US, AI, Cloud, HomeLab (headline-matched). - Remove the Finance pill; keep Tech (backend topic). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -51,13 +51,17 @@ struct SignalFeedView: View {
|
||||
} else {
|
||||
base = []
|
||||
}
|
||||
// Sports (incl. F1) live only under their own pills — the backend mis-tags
|
||||
// them into finance/tech/politics, so exclude them everywhere else.
|
||||
let isSport: (StorySummary) -> Bool = { Interest.isFormula1($0) || Interest.isSports($0) }
|
||||
if let interest = selectedInterest {
|
||||
if interest.id == "f1" { return base.filter(interest.matches) }
|
||||
// Other pills (incl. Tech/Finance) exclude F1 (backend mis-tags it).
|
||||
return base.filter { interest.matches($0) && !Interest.f1.matches($0) }
|
||||
if interest.id == "f1" || interest.id == "sport" {
|
||||
return base.filter(interest.matches)
|
||||
}
|
||||
return base.filter { interest.matches($0) && !isSport($0) }
|
||||
}
|
||||
// "All" is news-only: F1 lives solely under its own pill.
|
||||
return base.filter { !Interest.f1.matches($0) }
|
||||
// "All" is news-only: no sports.
|
||||
return base.filter { !isSport($0) }
|
||||
}
|
||||
|
||||
/// The main feed: unread stories, with already-seen ones sunk below fresh ones.
|
||||
|
||||
Reference in New Issue
Block a user