diff options
Diffstat (limited to 'src/state/models/badges-view.ts')
-rw-r--r-- | src/state/models/badges-view.ts | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/state/models/badges-view.ts b/src/state/models/badges-view.ts new file mode 100644 index 000000000..644ec7d9e --- /dev/null +++ b/src/state/models/badges-view.ts @@ -0,0 +1,49 @@ +import {makeAutoObservable} from 'mobx' +import {RootStoreModel} from './root-store' + +// TODO / DEBUG +// this is a temporary fake for the model until the view actually gets implemented in the bsky api +// -prf + +export class BadgesViewModel { + // state + isLoading = false + isRefreshing = false + hasLoaded = false + error = '' + + constructor(public rootStore: RootStoreModel) { + makeAutoObservable( + this, + { + rootStore: false, + }, + {autoBind: true}, + ) + } + + get hasContent() { + return false + } + + get hasError() { + return this.error !== '' + } + + get isEmpty() { + return this.hasLoaded && !this.hasContent + } + + // public api + // = + + async setup() { + this.hasLoaded = true + } + + async refresh() {} + + async loadMore() {} + + async update() {} +} |