Readme (#567)
* Update readme. * updates * Update and fix startup issues.
This commit is contained in:
@@ -33,7 +33,16 @@ const MenuDefaultIcon = ({ item }: MenuEntryProps): JSX.Element => {
|
||||
};
|
||||
|
||||
const MenuEntry = ({ item, child }: MenuEntryProps): JSX.Element => {
|
||||
const menu = createMenu(item.menuModel, item.actionGroup);
|
||||
let menu: Gtk.Menu;
|
||||
|
||||
const entryBinding = Variable.derive(
|
||||
[bind(item, 'menuModel'), bind(item, 'actionGroup')],
|
||||
(menuModel, actionGroup) => {
|
||||
if (menuModel && actionGroup) {
|
||||
menu = createMenu(menuModel, actionGroup);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
return (
|
||||
<button
|
||||
@@ -51,7 +60,10 @@ const MenuEntry = ({ item, child }: MenuEntryProps): JSX.Element => {
|
||||
Notify({ summary: 'App Name', body: item.id });
|
||||
}
|
||||
}}
|
||||
onDestroy={() => menu?.destroy()}
|
||||
onDestroy={() => {
|
||||
menu?.destroy();
|
||||
entryBinding.drop();
|
||||
}}
|
||||
>
|
||||
{child}
|
||||
</button>
|
||||
|
||||
@@ -11,7 +11,9 @@ import { bluetoothService } from 'src/lib/constants/services';
|
||||
* @returns An array of available Bluetooth devices.
|
||||
*/
|
||||
export const getAvailableBluetoothDevices = (): AstalBluetooth.Device[] => {
|
||||
const availableDevices = bluetoothService.devices
|
||||
const bluetoothDevices = bluetoothService.get_devices() ?? [];
|
||||
|
||||
const availableDevices = bluetoothDevices
|
||||
.filter((btDev) => btDev.name !== null)
|
||||
.sort((a, b) => {
|
||||
if (a.connected || a.paired) {
|
||||
|
||||
@@ -69,7 +69,7 @@ const dedupeWAPs = (): AstalNetwork.AccessPoint[] => {
|
||||
return [];
|
||||
}
|
||||
|
||||
const WAPs = networkService.wifi.accessPoints;
|
||||
const WAPs = networkService.wifi.get_access_points();
|
||||
const dedupMap: Record<string, AstalNetwork.AccessPoint> = {};
|
||||
|
||||
WAPs.forEach((item: AstalNetwork.AccessPoint) => {
|
||||
|
||||
Reference in New Issue
Block a user