Skip to content

Commit

Permalink
Including upcoming feature flag in subtitle (if applicable)
Browse files Browse the repository at this point in the history
  • Loading branch information
ole committed May 15, 2024
1 parent 245ddd2 commit d3e8bfd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion se-lookup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,14 @@ extension AlfredItem {
init(proposal: Proposal) {
self.uid = proposal.url.absoluteString
self.title = "\(proposal.id): \(proposal.title)"
self.subtitle = "\(proposal.status.description)"
var subtitle = proposal.status.description
if let upcomingFeatureFlag = proposal.upcomingFeatureFlag {
subtitle.append(" · Feature flag: \(upcomingFeatureFlag.flag)")
if let languageMode = upcomingFeatureFlag.enabledInLanguageMode {
subtitle.append(" (enabled in Swift \(languageMode) language version)")
}
}
self.subtitle = subtitle
self.arg = proposal.url.absoluteString
self.autocomplete = proposal.id
self.quicklookurl = proposal.url.absoluteString
Expand Down

0 comments on commit d3e8bfd

Please sign in to comment.