forked from mystiq/hydrogen-web
changes signature of emitChange to require changedProps
This commit is contained in:
parent
7b7b19476c
commit
aeed978789
3 changed files with 3 additions and 3 deletions
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||
import {Client} from "../matrix/Client.js";
|
||||
import {SessionViewModel} from "./session/SessionViewModel.js";
|
||||
import {SessionLoadViewModel} from "./SessionLoadViewModel.js";
|
||||
import {LoginViewModel} from "./login/LoginViewModel.ts";
|
||||
import {LoginViewModel} from "./login/LoginViewModel";
|
||||
import {LogoutViewModel} from "./LogoutViewModel";
|
||||
import {SessionPickerViewModel} from "./SessionPickerViewModel.js";
|
||||
import {ViewModel} from "./ViewModel";
|
||||
|
|
|
@ -115,7 +115,7 @@ export class ViewModel<O extends Options = Options> extends EventEmitter<{change
|
|||
return result;
|
||||
}
|
||||
|
||||
emitChange(changedProps?: any): void {
|
||||
emitChange(changedProps: any): void {
|
||||
if (this._options.emitChange) {
|
||||
this._options.emitChange(changedProps);
|
||||
} else {
|
||||
|
|
|
@ -208,7 +208,7 @@ export class LoginViewModel extends ViewModel<Options> {
|
|||
this._showError("");
|
||||
this._disposeViewModels();
|
||||
this._abortQueryOperation = this.disposeTracked(this._abortQueryOperation);
|
||||
this.emitChange(); // multiple fields changing
|
||||
this.emitChange("loginViewModels"); // multiple fields changing
|
||||
// also clear the timeout if it is still running
|
||||
this.disposeTracked(this._abortHomeserverQueryTimeout);
|
||||
const timeout = this.clock.createTimeout(1000);
|
||||
|
|
Loading…
Reference in a new issue