feat(market): one-time community-rules gate before joining the market, publishing or messaging
This commit is contained in:
parent
a7e10eba7a
commit
5d25f65f76
7 changed files with 311 additions and 1 deletions
|
|
@ -9,10 +9,20 @@ class OnboardingStore {
|
|||
final SecretStore _store;
|
||||
|
||||
static const _introSeenKey = 'tane.intro_seen';
|
||||
static const _marketRulesKey = 'tane.market_rules_accepted';
|
||||
|
||||
/// Whether the user has already seen (or skipped) the intro carousel.
|
||||
Future<bool> introSeen() async => await _store.read(_introSeenKey) == '1';
|
||||
|
||||
/// Records that the intro has been shown; subsequent launches skip it.
|
||||
Future<void> markIntroSeen() => _store.write(_introSeenKey, '1');
|
||||
|
||||
/// Whether the user has accepted the community rules that gate the market.
|
||||
/// Required once before joining the market or publishing anything (stores
|
||||
/// ask for terms acceptance before user content is created).
|
||||
Future<bool> marketRulesAccepted() async =>
|
||||
await _store.read(_marketRulesKey) == '1';
|
||||
|
||||
/// Records the one-time acceptance of the community rules.
|
||||
Future<void> markMarketRulesAccepted() => _store.write(_marketRulesKey, '1');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue