mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Add return types
This commit is contained in:
parent
afee565eb7
commit
b86fdd476f
@ -28,7 +28,7 @@ export abstract class BaseToastNotificationViewModel<T extends BaseClassOptions
|
||||
super(options);
|
||||
}
|
||||
|
||||
dismiss() {
|
||||
dismiss(): void {
|
||||
this.getOption("dismiss")();
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ export class CallToastNotificationViewModel extends BaseToastNotificationViewMod
|
||||
}));
|
||||
}
|
||||
|
||||
async join() {
|
||||
async join(): Promise<void> {
|
||||
await this.logAndCatch("CallToastNotificationViewModel.join", async (log) => {
|
||||
const stream = await this.platform.mediaDevices.getMediaTracks(false, true);
|
||||
const localMedia = new LocalMedia().withUserMedia(stream);
|
||||
@ -79,19 +79,19 @@ export class CallToastNotificationViewModel extends BaseToastNotificationViewMod
|
||||
return this.call.members.size;
|
||||
}
|
||||
|
||||
get avatarLetter() {
|
||||
get avatarLetter(): string {
|
||||
return avatarInitials(this.roomName);
|
||||
}
|
||||
|
||||
get avatarColorNumber() {
|
||||
get avatarColorNumber(): number {
|
||||
return getIdentifierColorNumber(this.room.avatarColorId);
|
||||
}
|
||||
|
||||
avatarUrl(size: number) {
|
||||
avatarUrl(size: number): string | undefined {
|
||||
return getAvatarHttpUrl(this.room.avatarUrl, size, this.platform, this.room.mediaRepository);
|
||||
}
|
||||
|
||||
get avatarTitle() {
|
||||
get avatarTitle(): string {
|
||||
return this.roomName;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user