diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-03-06 15:34:22 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-06 15:34:22 -0600 |
commit | 36791e68b3214cab9714a29d40fd7ecae2794c5e (patch) | |
tree | 47d5703595de08c5e5eff874285ae47b7a2a0427 /src/state/models/shell-ui.ts | |
parent | 74c30c60b8b5e68176b1447524db7e725f75a372 (diff) | |
download | voidsky-36791e68b3214cab9714a29d40fd7ecae2794c5e.tar.zst |
Onboarding tweaks (#272)
* Small fix to side menu rendering * Change onboarding to use an explicit 'is onboarding' mode to more clearly control the flow * Add a progress bar to the welcome banner * Dont show the 'unfollow button' on posts in weird times (close #271) * Improve the empty state of the feed * Only suggest recent posts
Diffstat (limited to 'src/state/models/shell-ui.ts')
-rw-r--r-- | src/state/models/shell-ui.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/state/models/shell-ui.ts b/src/state/models/shell-ui.ts index 1b0e350a2..0dad2bd9e 100644 --- a/src/state/models/shell-ui.ts +++ b/src/state/models/shell-ui.ts @@ -118,6 +118,7 @@ export class ShellUiModel { activeLightbox: ProfileImageLightbox | ImagesLightbox | undefined isComposerActive = false composerOpts: ComposerOpts | undefined + isOnboarding = false constructor(public rootStore: RootStoreModel) { makeAutoObservable(this, { @@ -185,4 +186,13 @@ export class ShellUiModel { this.isComposerActive = false this.composerOpts = undefined } + + setOnboarding(v: boolean) { + this.isOnboarding = v + if (this.isOnboarding) { + this.rootStore.me.mainFeed.switchFeedType('suggested') + } else { + this.rootStore.me.mainFeed.switchFeedType('home') + } + } } |