matrix-react-sdk
Version:
SDK for matrix.org using React
37 lines (36 loc) • 1.29 kB
TypeScript
import { ActionPayload } from "../dispatcher/payloads";
import { AsyncStoreWithClient } from "./AsyncStoreWithClient";
interface IState {
displayName?: string;
avatarUrl?: string;
fetchedAt?: number;
}
export declare class OwnProfileStore extends AsyncStoreWithClient<IState> {
private static readonly internalInstance;
private monitoredUser;
constructor();
static get instance(): OwnProfileStore;
/**
* Gets the display name for the user, or null if not present.
*/
get displayName(): string | null;
get isProfileInfoFetched(): boolean;
/**
* Gets the MXC URI of the user's avatar, or null if not present.
*/
get avatarMxc(): string | null;
/**
* Gets the user's avatar as an HTTP URL of the given size. If the user's
* avatar is not present, this returns null.
* @param size The size of the avatar. If zero, a full res copy of the avatar
* will be returned as an HTTP URL.
* @returns The HTTP URL of the user's avatar
*/
getHttpAvatarUrl(size?: number): string | null;
protected onNotReady(): Promise<void>;
protected onReady(): Promise<void>;
protected onAction(payload: ActionPayload): Promise<void>;
private onProfileUpdate;
private onStateEvents;
}
export {};