Improve monitor reconnect/disconnect logic. (#974)
* WIP: Improve monitor reconnect logic * Organize revealer into a controller and clean up bindings of destroyed bars. * Improve monitor disconnect/reconnect logic. * Add JSDoc
This commit is contained in:
@@ -35,19 +35,6 @@ export class NetworkService {
|
||||
return this._instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up bindings to monitor network service changes
|
||||
*/
|
||||
private _setupBindings(): void {
|
||||
Variable.derive([bind(this._astalNetwork, 'wifi')], () => {
|
||||
this.wifi.onWifiServiceChanged();
|
||||
});
|
||||
|
||||
Variable.derive([bind(this._astalNetwork, 'wired')], () => {
|
||||
this.ethernet.onWiredServiceChanged();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the appropriate WiFi icon based on the provided icon name.
|
||||
*
|
||||
@@ -67,4 +54,17 @@ export class NetworkService {
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up bindings to monitor network service changes
|
||||
*/
|
||||
private _setupBindings(): void {
|
||||
Variable.derive([bind(this._astalNetwork, 'wifi')], () => {
|
||||
this.wifi.onWifiServiceChanged();
|
||||
});
|
||||
|
||||
Variable.derive([bind(this._astalNetwork, 'wired')], () => {
|
||||
this.ethernet.onWiredServiceChanged();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user