mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
No need to pass in callHandler separately
because session is already passed
This commit is contained in:
parent
fa5cb684b0
commit
d2b1fc7fef
@ -49,7 +49,6 @@ export class SessionViewModel extends ViewModel {
|
||||
this._createRoomViewModel = null;
|
||||
this._joinRoomViewModel = null;
|
||||
this._toastCollectionViewModel = this.track(new ToastCollectionViewModel(this.childOptions({
|
||||
callHandler: this._client.session.callHandler,
|
||||
session: this._client.session,
|
||||
})));
|
||||
this._setupNavigation();
|
||||
|
@ -14,16 +14,14 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import {ObservableArray, ObservableMap} from "../../../observable";
|
||||
import {ObservableArray} from "../../../observable";
|
||||
import {ViewModel, Options as BaseOptions} from "../../ViewModel";
|
||||
import type {GroupCall} from "../../../matrix/calls/group/GroupCall";
|
||||
import type {Room} from "../../../matrix/room/Room.js";
|
||||
import type {CallHandler} from "../../../matrix/calls/CallHandler";
|
||||
import type {Session} from "../../../matrix/Session.js";
|
||||
import {CallToastNotificationViewModel} from "./CallToastNotificationViewModel";
|
||||
|
||||
type Options = {
|
||||
callHandler: CallHandler;
|
||||
session: Session;
|
||||
} & BaseOptions;
|
||||
|
||||
@ -32,7 +30,8 @@ export class ToastCollectionViewModel extends ViewModel<Options> {
|
||||
|
||||
constructor(options: Options) {
|
||||
super(options);
|
||||
const callsObservableMap = this.getOption("callHandler").calls;
|
||||
const session = this.getOption("session");
|
||||
const callsObservableMap = session.callHandler.calls;
|
||||
this.track(callsObservableMap.subscribe(this));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user