diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-11-05 11:58:48 -0500 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-11-05 11:58:48 -0500 |
commit | 60b1c53d8571dfcb0b60e530e67ca311da82370a (patch) | |
tree | 853293eb23e2433572bbfbaba1783b46b3fc1084 /src/state/models/profile-view.ts | |
parent | 3f730f1173a3c27a6bd54b91f48ecb9220a42730 (diff) | |
download | voidsky-60b1c53d8571dfcb0b60e530e67ca311da82370a.tar.zst |
Add actor types to the profiles and clean up the UI
Diffstat (limited to 'src/state/models/profile-view.ts')
-rw-r--r-- | src/state/models/profile-view.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/state/models/profile-view.ts b/src/state/models/profile-view.ts index ebb75bdb6..09f1991e1 100644 --- a/src/state/models/profile-view.ts +++ b/src/state/models/profile-view.ts @@ -4,6 +4,9 @@ import * as Profile from '../../third-party/api/src/client/types/app/bsky/actor/ import {RootStoreModel} from './root-store' import * as apilib from '../lib/api' +export const ACTOR_TYPE_USER = 'app.bsky.system.actorUser' +export const ACTOR_TYPE_SCENE = 'app.bsky.system.actorScene' + export class ProfileViewMyStateModel { follow?: string @@ -23,6 +26,7 @@ export class ProfileViewModel { // data did: string = '' handle: string = '' + actorType = ACTOR_TYPE_USER displayName?: string description?: string followersCount: number = 0 @@ -57,6 +61,14 @@ export class ProfileViewModel { return this.hasLoaded && !this.hasContent } + get isUser() { + return this.actorType === ACTOR_TYPE_USER + } + + get isScene() { + return this.actorType === ACTOR_TYPE_SCENE + } + // public api // = |