mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-02-02 07:31:38 +01:00
Fix rebase again
This commit is contained in:
parent
53c0fc2934
commit
6e2cd3597f
@ -32,11 +32,13 @@ export class VerificationToastCollectionViewModel extends ViewModel<SegmentType,
|
|||||||
|
|
||||||
constructor(options: Options) {
|
constructor(options: Options) {
|
||||||
super(options);
|
super(options);
|
||||||
this.track(
|
this.subscribeToSASRequests();
|
||||||
options.session.crossSigning.subscribe((crossSigning) => {
|
}
|
||||||
this.track(crossSigning.receivedSASVerifications.subscribe(this));
|
|
||||||
})
|
private async subscribeToSASRequests() {
|
||||||
);
|
await this.getOption("session").crossSigning.waitFor(v => !!v).promise;
|
||||||
|
const crossSigning = this.getOption("session").crossSigning.get();
|
||||||
|
this.track(crossSigning.receivedSASVerifications.subscribe(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -365,6 +365,7 @@ export class Session {
|
|||||||
olm: this._olm,
|
olm: this._olm,
|
||||||
olmUtil: this._olmUtil,
|
olmUtil: this._olmUtil,
|
||||||
deviceTracker: this._deviceTracker,
|
deviceTracker: this._deviceTracker,
|
||||||
|
deviceMessageHandler: this._deviceMessageHandler,
|
||||||
hsApi: this._hsApi,
|
hsApi: this._hsApi,
|
||||||
ownUserId: this.userId,
|
ownUserId: this.userId,
|
||||||
e2eeAccount: this._e2eeAccount
|
e2eeAccount: this._e2eeAccount
|
||||||
|
@ -86,7 +86,11 @@ export class SelectVerificationMethodStage extends BaseSASVerificationStage {
|
|||||||
private async findDeviceName(log: ILogItem) {
|
private async findDeviceName(log: ILogItem) {
|
||||||
await log.wrap("SelectVerificationMethodStage.findDeviceName", async () => {
|
await log.wrap("SelectVerificationMethodStage.findDeviceName", async () => {
|
||||||
const device = await this.options.deviceTracker.deviceForId(this.otherUserId, this.otherUserDeviceId, this.options.hsApi, log);
|
const device = await this.options.deviceTracker.deviceForId(this.otherUserId, this.otherUserDeviceId, this.options.hsApi, log);
|
||||||
this.otherDeviceName = device.displayName;
|
if (!device) {
|
||||||
|
log.log({ l: "Cannot find device", userId: this.otherUserId, deviceId: this.otherUserDeviceId });
|
||||||
|
throw new Error("Cannot find device");
|
||||||
|
}
|
||||||
|
this.otherDeviceName = device.unsigned.device_display_name ?? device.device_id;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,13 +37,13 @@ function toastViewModelToView(vm: BaseToastNotificationViewModel): IView {
|
|||||||
|
|
||||||
export class ToastCollectionView extends TemplateView<ToastCollectionViewModel> {
|
export class ToastCollectionView extends TemplateView<ToastCollectionViewModel> {
|
||||||
render(t: Builder<ToastCollectionViewModel>, vm: ToastCollectionViewModel) {
|
render(t: Builder<ToastCollectionViewModel>, vm: ToastCollectionViewModel) {
|
||||||
const view = new ListView({
|
|
||||||
list: vm.toastViewModels,
|
|
||||||
parentProvidesUpdates: false,
|
|
||||||
}, (vm: CallToastNotificationViewModel) => toastViewModelToView(vm));
|
|
||||||
|
|
||||||
return t.div({ className: "ToastCollectionView" }, [
|
return t.div({ className: "ToastCollectionView" }, [
|
||||||
t.if(vm => !!vm.toastViewModels, (t) => t.view(view)),
|
t.ifView(vm => !!vm.toastViewModels, t => {
|
||||||
|
return new ListView({
|
||||||
|
list: vm.toastViewModels,
|
||||||
|
parentProvidesUpdates: false,
|
||||||
|
}, (vm: CallToastNotificationViewModel) => toastViewModelToView(vm));
|
||||||
|
}),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user