DEV: Fix `super` calls in native chat classes (#24583)

This commit is contained in:
Jarek Radosz 2023-11-28 10:44:47 +01:00 committed by GitHub
parent a80e32fe75
commit b2dfc320aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 5 deletions

View File

@ -106,7 +106,7 @@ export default class ChannelsList extends Component {
} }
didRender() { didRender() {
this._super(...arguments); super.didRender(...arguments);
schedule("afterRender", this._applyScrollPosition); schedule("afterRender", this._applyScrollPosition);
} }

View File

@ -16,7 +16,7 @@ export default class ChatBrowseView extends Component {
tagName = ""; tagName = "";
didReceiveAttrs() { didReceiveAttrs() {
this._super(...arguments); super.didReceiveAttrs(...arguments);
if (!this.channelsCollection) { if (!this.channelsCollection) {
this.set("channelsCollection", this.chatApi.channels()); this.set("channelsCollection", this.chatApi.channels());

View File

@ -60,6 +60,7 @@ export default class ChatChannelMessageEmojiPicker extends Component {
@action @action
willDestroy() { willDestroy() {
super.willDestroy(...arguments);
this._popper?.destroy(); this._popper?.destroy();
} }

View File

@ -12,7 +12,7 @@ export default class ChatVh extends Component {
tagName = ""; tagName = "";
didInsertElement() { didInsertElement() {
this._super(...arguments); super.didInsertElement(...arguments);
if ("virtualKeyboard" in navigator) { if ("virtualKeyboard" in navigator) {
navigator.virtualKeyboard.overlaysContent = true; navigator.virtualKeyboard.overlaysContent = true;
@ -25,7 +25,7 @@ export default class ChatVh extends Component {
} }
willDestroyElement() { willDestroyElement() {
this._super(...arguments); super.willDestroyElement(...arguments);
this.activeWindow?.removeEventListener("resize", this.setVH); this.activeWindow?.removeEventListener("resize", this.setVH);
lastVH = null; lastVH = null;

View File

@ -40,6 +40,7 @@ export default class ChatModalCreateChannel extends Component {
#generateSlugHandler = null; #generateSlugHandler = null;
willDestroy() { willDestroy() {
super.willDestroy(...arguments);
cancel(this.#generateSlugHandler); cancel(this.#generateSlugHandler);
} }

View File

@ -34,7 +34,7 @@ export default class ChatAudioManager extends Service {
} }
willDestroy() { willDestroy() {
this._super(...arguments); super.willDestroy(...arguments);
this._audioCache = {}; this._audioCache = {};
} }