-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into large_file_upload_error
- Loading branch information
Showing
6 changed files
with
70 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
/// A set of feature flag values used for testing that can be customized. | ||
class MockFeatureFlags: FeatureFlags { | ||
var newMediaDisplayEnabled = false | ||
/// Mock feature flags and their values. | ||
private var featureFlags: [FeatureFlag: Bool] = [ | ||
.newMediaDisplay: false, | ||
.newModerationFlow: false | ||
] | ||
|
||
func setNewMediaDisplayEnabled(_ enabled: Bool) { | ||
newMediaDisplayEnabled = enabled | ||
func isEnabled(_ feature: FeatureFlag) -> Bool { | ||
featureFlags[feature] ?? false | ||
} | ||
|
||
func setFeature(_ feature: FeatureFlag, enabled: Bool) { | ||
featureFlags[feature] = enabled | ||
} | ||
} |