@streamlayer/feature-gamification
Advanced tools
Comparing version 1.9.1 to 1.9.2
@@ -53,2 +53,3 @@ import { AbstractFeature, ApiStore, FeatureSource, type FeatureProps, type StreamLayerContext } from '@streamlayer/sdk-web-interfaces'; | ||
onboardingProcessed: WritableAtom<boolean>; | ||
friendsTabEnabled: WritableAtom<boolean>; | ||
private notifications; | ||
@@ -55,0 +56,0 @@ private transport; |
@@ -54,2 +54,3 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ | ||
onboardingProcessed; | ||
friendsTabEnabled; | ||
notifications; | ||
@@ -107,2 +108,16 @@ transport; | ||
this.background.activeQuestionId.listen(this.showInApp); | ||
this.friendsTabEnabled = createSingleStore(false); | ||
this.cancels.add(instance.sdk.options.subscribe((data) => { | ||
if (data.friendsTab === 'disabled') { | ||
this.friendsTabEnabled.set(false); | ||
} | ||
else if (data.friendsTab === 'enabled') { | ||
this.friendsTabEnabled.set(true); | ||
} | ||
})); | ||
this.cancels.add(this.settings.subscribe((settings) => { | ||
if (instance.sdk.options.get().friendsTab === 'activatedGame') { | ||
this.friendsTabEnabled.set(!!settings.inplayGame?.titleCard?.optIn); | ||
} | ||
})); | ||
instance.sdk.onMount({ name: 'gamification', clear: true }, () => { | ||
@@ -109,0 +124,0 @@ return () => { |
{ | ||
"name": "@streamlayer/feature-gamification", | ||
"version": "1.9.1", | ||
"version": "1.9.2", | ||
"peerDependencies": { | ||
@@ -9,9 +9,9 @@ "@bufbuild/protobuf": "^1.10.0", | ||
"nanostores": "^0.10.3", | ||
"@streamlayer/sdk-web-api": "^1.6.7", | ||
"@streamlayer/sdk-web-core": "^1.6.6", | ||
"@streamlayer/sdk-web-interfaces": "^1.2.7", | ||
"@streamlayer/sdk-web-logger": "^1.0.28", | ||
"@streamlayer/sdk-web-notifications": "^1.2.7", | ||
"@streamlayer/sdk-web-storage": "^1.0.28", | ||
"@streamlayer/sdk-web-types": "^1.8.1" | ||
"@streamlayer/sdk-web-api": "^1.6.8", | ||
"@streamlayer/sdk-web-core": "^1.7.0", | ||
"@streamlayer/sdk-web-interfaces": "^1.2.8", | ||
"@streamlayer/sdk-web-logger": "^1.0.29", | ||
"@streamlayer/sdk-web-notifications": "^1.2.8", | ||
"@streamlayer/sdk-web-storage": "^1.0.29", | ||
"@streamlayer/sdk-web-types": "^1.8.2" | ||
}, | ||
@@ -18,0 +18,0 @@ "devDependencies": { |
134697
2707