purple: disable apple IAP ui by default
We do not have Apple In-app purchases ready for the upcoming release. This commit hides IAP UI/UX behind a developer feature flag which is off by default, and shows a link inviting the user to visit the website to learn more. It also makes the link go to the normal Damus website. Signed-off-by: Daniel D’Aquino <daniel@daquino.me> Reviewed-by: William Casarin <jb55@jb55.com> Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
committed by
William Casarin
parent
e649c49981
commit
cdd5327829
@@ -31,6 +31,12 @@ class DamusPurple: StoreObserverDelegate {
|
||||
// TODO: On release, we could just replace this with `true` (or some other feature flag)
|
||||
return self.settings.enable_experimental_purple_api
|
||||
}
|
||||
|
||||
// Whether to enable Apple In-app purchase support
|
||||
var enable_purple_iap_support: Bool {
|
||||
// TODO: When we have full support for Apple In-app purchases, we can replace this with `true` (or another feature flag)
|
||||
return self.settings.enable_experimental_purple_iap_support
|
||||
}
|
||||
|
||||
func profile_purple_badge_info(pubkey: Pubkey) async -> UserBadgeInfo? {
|
||||
if let cached_result = self.starred_profiles_cache[pubkey] {
|
||||
|
||||
@@ -208,6 +208,9 @@ class UserSettingsStore: ObservableObject {
|
||||
@StringSetting(key: "purple_environment", default_value: .production)
|
||||
var purple_enviroment: DamusPurpleEnvironment
|
||||
|
||||
@Setting(key: "enable_experimental_purple_iap_support", default_value: false)
|
||||
var enable_experimental_purple_iap_support: Bool
|
||||
|
||||
@Setting(key: "emoji_reactions", default_value: default_emoji_reactions)
|
||||
var emoji_reactions: [String]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user