Skip to content

Commit b8a8f6d

Browse files
committed
Create new InjectionManager each time extension is enabled
Also: Do not run `increase_version` during `make release` as the version in metadata.json is auto-updated by extensions.gnome.org anyway.
1 parent b7fcf85 commit b8a8f6d

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

extension.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,12 @@ import * as History from 'resource:///org/gnome/shell/misc/history.js';
2121
import {Extension, InjectionManager} from 'resource:///org/gnome/shell/extensions/extension.js';
2222

2323
export default class HistoryManagerPrefixSearchExtension extends Extension {
24-
constructor(metadata) {
25-
super(metadata);
26-
this._injectionManager = new InjectionManager();
27-
}
28-
2924
enable() {
3025
this._settings = this.getSettings();
3126
const _settings = this._settings;
3227

28+
this._injectionManager = new InjectionManager();
29+
3330
this._injectionManager.overrideMethod(History.HistoryManager.prototype, 'prevItemPrefix', () => {
3431
return function (text, prefix) {
3532
/* eslint-disable no-invalid-this */
@@ -98,7 +95,7 @@ export default class HistoryManagerPrefixSearchExtension extends Extension {
9895

9996
disable() {
10097
this._injectionManager.clear();
101-
98+
this._injectionManager = null;
10299
this._settings = null;
103100
}
104101
}

0 commit comments

Comments
 (0)