This commit is contained in:
Nathaniel van Diepen 2023-06-04 13:30:28 -06:00 committed by Nathaniel van Diepen
parent ab835bf3b1
commit ed80ae1658
No known key found for this signature in database
GPG key ID: 87F4F19E784573DA

View file

@ -6,14 +6,14 @@ class BaTimeExtension {
constructor() { constructor() {
this.aggregateMenu = Panel.statusArea.quickSettings; this.aggregateMenu = Panel.statusArea.quickSettings;
this.originalIndicator = this.aggregateMenu._system; 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.aggregateMenu._indicators.replace_child(
this.originalIndicator, this.originalIndicator,
this.customIndicator this.customIndicator
); );
} }
destroy() { destroy() {
this.aggregateMenu._system = this.originalIndicator; delete this.aggregateMenu._batteryTime;
this.aggregateMenu._indicators.replace_child( this.aggregateMenu._indicators.replace_child(
this.customIndicator, this.customIndicator,
this.originalIndicator this.originalIndicator