diff options
author | Ansh Nanda <anshnanda10@gmail.com> | 2023-05-25 18:48:40 -0700 |
---|---|---|
committer | Ansh Nanda <anshnanda10@gmail.com> | 2023-05-25 18:48:40 -0700 |
commit | 4cd9a4493e0477d27fbaca7ae024440460de4a8a (patch) | |
tree | 56074015778f9b8c58d435d64ede3ec45f09df1e /src/state/models/feeds/custom-feed.ts | |
parent | 27ff9ce43b13b2bb612f27a202a6a153480c16c0 (diff) | |
download | voidsky-4cd9a4493e0477d27fbaca7ae024440460de4a8a.tar.zst |
add empty state for custom feed
Diffstat (limited to 'src/state/models/feeds/custom-feed.ts')
-rw-r--r-- | src/state/models/feeds/custom-feed.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/state/models/feeds/custom-feed.ts b/src/state/models/feeds/custom-feed.ts index 9ac69ac28..8fc1eb1ec 100644 --- a/src/state/models/feeds/custom-feed.ts +++ b/src/state/models/feeds/custom-feed.ts @@ -8,13 +8,19 @@ export class CustomFeedModel { // data _reactKey: string data: AppBskyFeedDefs.GeneratorView + isOnline: boolean + isValid: boolean constructor( public rootStore: RootStoreModel, view: AppBskyFeedDefs.GeneratorView, + isOnline?: boolean, + isValid?: boolean, ) { this._reactKey = view.uri this.data = view + this.isOnline = isOnline ?? true + this.isValid = isValid ?? true makeAutoObservable( this, { @@ -103,6 +109,8 @@ export class CustomFeedModel { }) runInAction(() => { this.data = res.data.view + this.isOnline = res.data.isOnline + this.isValid = res.data.isValid }) } |