refactor(ags): prioritise getters when using astal libs

This commit is contained in:
matt1432 2024-12-29 17:22:55 -05:00
commit 179e402504
30 changed files with 176 additions and 164 deletions
modules/ags/config/widgets/bar/items

View file

@ -27,13 +27,13 @@ export default () => {
'right',
);
win.visible = !win.visible;
win.set_visible(!win.get_visible());
}}
setup={(self) => {
App.connect('window-toggled', (_, win) => {
if (win.name === 'win-notif-center') {
self.toggleClassName('toggle-on', win.visible);
if (win.get_name() === 'win-notif-center') {
self.toggleClassName('toggle-on', win.get_visible());
}
});
}}
@ -41,7 +41,7 @@ export default () => {
<box>
<icon
icon={bind(notifications, 'notifications').as((notifs) => {
if (notifications.dontDisturb) {
if (notifications.get_dont_disturb()) {
return 'notification-disabled-symbolic';
}
else if (notifs.length > 0) {