mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
make media repo available on invite
This commit is contained in:
parent
9b9e6fceda
commit
aaf4e79a73
@ -78,7 +78,7 @@ export class BaseTileViewModel extends ViewModel {
|
||||
get avatarUrl() {
|
||||
if (this._avatarSource.avatarUrl) {
|
||||
const size = 32 * this.platform.devicePixelRatio;
|
||||
return this._room.mediaRepository.mxcUrlThumbnail(this._avatarSource.avatarUrl, size, size, "crop");
|
||||
return this._avatarSource.mediaRepository.mxcUrlThumbnail(this._avatarSource.avatarUrl, size, size, "crop");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -412,6 +412,7 @@ export class Session {
|
||||
hsApi: this._hsApi,
|
||||
emitCollectionRemove: this._inviteRemoveCallback,
|
||||
emitCollectionUpdate: this._inviteUpdateCallback,
|
||||
mediaRepository: this._mediaRepository,
|
||||
user: this._user,
|
||||
platform: this._platform,
|
||||
});
|
||||
|
@ -20,13 +20,14 @@ import {Heroes} from "./members/Heroes.js";
|
||||
import {MemberChange, RoomMember, EVENT_TYPE as MEMBER_EVENT_TYPE} from "./members/RoomMember.js";
|
||||
|
||||
export class Invite extends EventEmitter {
|
||||
constructor({roomId, user, hsApi, emitCollectionRemove, emitCollectionUpdate, platform}) {
|
||||
constructor({roomId, user, hsApi, mediaRepository, emitCollectionRemove, emitCollectionUpdate, platform}) {
|
||||
super();
|
||||
this._roomId = roomId;
|
||||
this._user = user;
|
||||
this._hsApi = hsApi;
|
||||
this._emitCollectionRemove = emitCollectionRemove;
|
||||
this._emitCollectionUpdate = emitCollectionUpdate;
|
||||
this._mediaRepository = mediaRepository;
|
||||
this._platform = platform;
|
||||
this._inviteData = null;
|
||||
this._accepting = false;
|
||||
@ -103,6 +104,10 @@ export class Invite extends EventEmitter {
|
||||
return this._rejected;
|
||||
}
|
||||
|
||||
get mediaRepository() {
|
||||
return this._mediaRepository;
|
||||
}
|
||||
|
||||
_emitChange(params) {
|
||||
this.emit("change");
|
||||
this._emitCollectionUpdate(this, params);
|
||||
|
Loading…
Reference in New Issue
Block a user