diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2022-05-20 18:08:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-20 18:08:20 -0400 |
commit | e498e2d029095e6f15417a3d7dfa693c497e54eb (patch) | |
tree | 9c3613e8b1ffb0be241bba9a53a03e5aabe41f8f /ext/js/display/option-toggle-hotkey-handler.js | |
parent | 31e20c889e467aa4ba64b0b5baf602adc1359371 (diff) |
Display notification updates (#2149)
* Expose container and node on DisplayNotification
* Add Display.createNotification
* Rename methods
* Rename fields
* Remove double newline
Diffstat (limited to 'ext/js/display/option-toggle-hotkey-handler.js')
-rw-r--r-- | ext/js/display/option-toggle-hotkey-handler.js | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/ext/js/display/option-toggle-hotkey-handler.js b/ext/js/display/option-toggle-hotkey-handler.js index a6db93f4..3f6b8052 100644 --- a/ext/js/display/option-toggle-hotkey-handler.js +++ b/ext/js/display/option-toggle-hotkey-handler.js @@ -15,10 +15,6 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -/* global - * DisplayNotification - */ - class OptionToggleHotkeyHandler { constructor(display) { this._display = display; @@ -126,9 +122,8 @@ class OptionToggleHotkeyHandler { _showNotification(message, autoClose) { if (this._notification === null) { - const node = this._display.displayGenerator.createEmptyFooterNotification(); - node.addEventListener('click', this._onNotificationClick.bind(this), false); - this._notification = new DisplayNotification(this._display.notificationContainer, node); + this._notification = this._display.createNotification(false); + this._notification.node.addEventListener('click', this._onNotificationClick.bind(this), false); } this._notification.setContent(message); |