Skip to content

Commit

Permalink
Add FeatureFlag
Browse files Browse the repository at this point in the history
  • Loading branch information
mallexxx committed Dec 18, 2024
1 parent 8dc9c3f commit 1da7874
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DuckDuckGo/Suggestions/Model/SuggestionContainer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ extension SuggestionContainer: SuggestionLoadingDataSource {
}

@MainActor func openTabs(for suggestionLoading: any Suggestions.SuggestionLoading) -> [any Suggestions.BrowserTab] {
openTabsProvider()
guard featureFlagger.isFeatureOn(.autcompleteTabs) else { return [] }
return openTabsProvider()
}

func suggestionLoading(_ suggestionLoading: SuggestionLoading,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public enum FeatureFlag: String, CaseIterable {
case isPrivacyProLaunchedROWOverride

case autofillPartialFormSaves
case autcompleteTabs
}

extension FeatureFlag: FeatureFlagDescribing {
Expand All @@ -63,6 +64,8 @@ extension FeatureFlag: FeatureFlagDescribing {
return true
case .autofillPartialFormSaves:
return true
case .autcompleteTabs:
return true
case .debugMenu,
.sslCertificatesBypass,
.appendAtbToSerpQueries,
Expand Down Expand Up @@ -107,6 +110,8 @@ extension FeatureFlag: FeatureFlagDescribing {
return .remoteReleasable(.subfeature(PrivacyProSubfeature.isLaunchedROWOverride))
case .autofillPartialFormSaves:
return .remoteReleasable(.subfeature(AutofillSubfeature.partialFormSaves))
case .autcompleteTabs:
return .remoteReleasable(.feature(.autocompleteTabs))
}
}
}
Expand Down

0 comments on commit 1da7874

Please sign in to comment.