Skip to content

Commit

Permalink
Snippets are early access feature. Refs blinksh#1755
Browse files Browse the repository at this point in the history
  • Loading branch information
yury committed Jul 18, 2023
1 parent 8617749 commit ff815b3
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Blink/SpaceController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,9 @@ extension SpaceController {
}

@objc func showSnippetsAction() {
guard EntitlementsManager.shared.earlyAccessFeatures.active || FeatureFlags.earlyAccessFeatures else {
return
}
if let _ = _snippetsVC {
return
}
Expand All @@ -977,9 +980,13 @@ extension SpaceController {
let menu = BlinkMenu()
self.view.addSubview(menu.tapToCloseView)

var ids: [BlinkActionID] = [
.snippets, .tabClose, .tabCreate,
]
var ids: [BlinkActionID] = []
if EntitlementsManager.shared.earlyAccessFeatures.active || FeatureFlags.earlyAccessFeatures {
ids.append(contentsOf: [.snippets])
}

ids.append(contentsOf: [.tabClose, .tabCreate])

if DeviceInfo.shared().hasCorners {
ids.append(contentsOf: [.layoutMenu])
}
Expand Down

0 comments on commit ff815b3

Please sign in to comment.