From c131563eca5cf4d7a1435cfc7250c64898eb6b8a Mon Sep 17 00:00:00 2001 From: Khai Truong Date: Sun, 25 Aug 2024 15:57:26 +0700 Subject: [PATCH] Hide inflection notification when open another popup --- ext/js/display/display.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ext/js/display/display.js b/ext/js/display/display.js index 76e1f4fa18..b121b1631b 100644 --- a/ext/js/display/display.js +++ b/ext/js/display/display.js @@ -795,6 +795,7 @@ export class Display extends EventDispatcher { this._eventListeners.removeAllEventListeners(); this._contentManager.unloadAll(); this._hideTagNotification(false); + this._hideInflectionNotification(false); this._triggerContentClear(); this._dictionaryEntries = []; this._dictionaryEntryNodes = []; @@ -1158,6 +1159,14 @@ export class Display extends EventDispatcher { this._tagNotification.close(animate); } + /** + * @param {boolean} animate + */ + _hideInflectionNotification(animate) { + if (this._inflectionNotification === null) { return; } + this._inflectionNotification.close(animate); + } + /** * @param {import('settings').ProfileOptions} options */