Merge pull request #15 from Eeems/patch-2

Fix #14
This commit is contained in:
Martin Zurowietz 2023-06-04 21:59:45 +02:00 committed by GitHub
commit a9d379a5c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,14 +6,14 @@ class BaTimeExtension {
constructor() {
this.aggregateMenu = Panel.statusArea.quickSettings;
this.originalIndicator = this.aggregateMenu._system;
this.aggregateMenu._system = this.customIndicator = new BaTime.imports.power.Indicator();
this.aggregateMenu._batteryTime = this.customIndicator = new BaTime.imports.power.Indicator();
this.aggregateMenu._indicators.replace_child(
this.originalIndicator,
this.customIndicator
);
}
destroy() {
this.aggregateMenu._system = this.originalIndicator;
delete this.aggregateMenu._batteryTime;
this.aggregateMenu._indicators.replace_child(
this.customIndicator,
this.originalIndicator