This commit is contained in:
2025-08-13 12:55:27 +08:00
parent db0b040fd8
commit 53e2687546
4 changed files with 89 additions and 58 deletions
@@ -76,6 +76,7 @@ export class ChatPanel extends li_BaseView {
Utils.addInnerEL(InnerMsgCode.LanguageChange, this, this.onLanguageChangeCallback);
}
onDestroy(): void {
Utils.removeInnerEL(InnerMsgCode.Chat_DialogRefresh, this, this.onDialogUpdate);
Utils.removeInnerEL(InnerMsgCode.LanguageChange, this, this.onLanguageChangeCallback);
}
refresh(id: number) {
@@ -107,7 +108,9 @@ export class ChatPanel extends li_BaseView {
});
}
onDialogUpdate() {
this.layout.UpdateDialog(DialogManager.getInstance().getDialogs());
if (this.layout) {
this.layout.UpdateDialog(DialogManager.getInstance().getDialogs());
}
}
protected onEnable(): void {
if (!this.manager) this.manager = DialogManager.getInstance();