diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-10-04 11:33:32 -0500 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-10-04 11:33:32 -0500 |
commit | 236c9080587ad9e63fa3330d2567640ea2f64fb4 (patch) | |
tree | a40bc4b31ab5594b8b07ebcf7b1e69c93842a6a5 /src/state/models/shell.ts | |
parent | 0aaa406b179e366e6a527f052379184787440b42 (diff) | |
download | voidsky-236c9080587ad9e63fa3330d2567640ea2f64fb4.tar.zst |
Update the view after a post is created
Diffstat (limited to 'src/state/models/shell.ts')
-rw-r--r-- | src/state/models/shell.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/state/models/shell.ts b/src/state/models/shell.ts index 3a5376421..7ef8137e8 100644 --- a/src/state/models/shell.ts +++ b/src/state/models/shell.ts @@ -34,11 +34,19 @@ export class SharePostModel { } } +export interface ComposePostModelOpts { + replyTo?: string + onPost?: () => void +} export class ComposePostModel { name = 'compose-post' + replyTo?: string + onPost?: () => void - constructor(public replyTo?: string) { + constructor(opts?: ComposePostModelOpts) { makeAutoObservable(this) + this.replyTo = opts?.replyTo + this.onPost = opts?.onPost } } |