diff options
author | Eric Bailey <git@esb.lol> | 2023-12-24 16:24:56 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-24 14:24:56 -0800 |
commit | b1994051344c8dbb1f3b710d6343591daa6756b8 (patch) | |
tree | 1c19750ad5f4748a29f0d41fd79142a7c1a7846f /src/state/persisted | |
parent | 28e0df595fef024526da4a0ba22cba9fdc07808f (diff) | |
download | voidsky-b1994051344c8dbb1f3b710d6343591daa6756b8.tar.zst |
Hide posts tool (#2299)
* Set up hidden posts persisted state * Wrap moderatePost * Integrate hidden posts into moderation * Complete hide-post behaviors --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Diffstat (limited to 'src/state/persisted')
-rw-r--r-- | src/state/persisted/legacy.ts | 1 | ||||
-rw-r--r-- | src/state/persisted/schema.ts | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/state/persisted/legacy.ts b/src/state/persisted/legacy.ts index f689c3d06..cdb542f5a 100644 --- a/src/state/persisted/legacy.ts +++ b/src/state/persisted/legacy.ts @@ -108,6 +108,7 @@ export function transform(legacy: Partial<LegacySchema>): Schema { onboarding: { step: legacy.onboarding?.step || defaults.onboarding.step, }, + hiddenPosts: defaults.hiddenPosts, } } diff --git a/src/state/persisted/schema.ts b/src/state/persisted/schema.ts index 5ed8e01f3..27b1f26bd 100644 --- a/src/state/persisted/schema.ts +++ b/src/state/persisted/schema.ts @@ -37,6 +37,7 @@ export const schema = z.object({ onboarding: z.object({ step: z.string(), }), + hiddenPosts: z.array(z.string()).optional(), // should move to server }) export type Schema = z.infer<typeof schema> @@ -66,4 +67,5 @@ export const defaults: Schema = { onboarding: { step: 'Home', }, + hiddenPosts: [], } |