Skip to content

Commit bfacfc2

Browse files
committed
fix: sharing notification click opening directories
1 parent 505865f commit bfacfc2

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/gui/src/UI/UIDesktop.js

+25
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,18 @@ async function UIDesktop(options){
243243
}),
244244
});
245245
},
246+
click: async (notif) => {
247+
if(notification.template === "file-shared-with-you"){
248+
let item_path = '/' + notification.fields?.username;
249+
UIWindow({
250+
path: '/' + notification.fields?.username,
251+
title: path.basename(item_path),
252+
icon: await item_icon({is_dir: true, path: item_path}),
253+
is_dir: true,
254+
app: 'explorer',
255+
});
256+
}
257+
},
246258
});
247259
}
248260
});
@@ -1306,6 +1318,19 @@ async function UIDesktop(options){
13061318
}
13071319
notification.icon = icon;
13081320

1321+
notification.click = async (notif) => {
1322+
if(notification.template === "file-shared-with-you"){
1323+
let item_path = '/' + notification.fields?.username;
1324+
UIWindow({
1325+
path: '/' + notification.fields?.username,
1326+
title: path.basename(item_path),
1327+
icon: await item_icon({is_dir: true, path: item_path}),
1328+
is_dir: true,
1329+
app: 'explorer',
1330+
});
1331+
}
1332+
}
1333+
13091334
UINotification(notification);
13101335
})
13111336
}

0 commit comments

Comments
 (0)