feat(app): desktop notifications on Windows

Toasts through WinRT, under the app id io.narl.proton-stream. The id is
registered for the current user under HKCU\Software\Classes\AppUserModelId
with a display name and icon on the first notification of a session, which
is what lets an app with no package or installer-made shortcut show one. If
that write fails, the toast goes out under PowerShell's id rather than not
at all.
This commit is contained in:
nvrl committed 2026-10-02 23:27:25 +02:00
1 parent 4a54af3245
commit 4d44db0949
6 files changed
+188 -16

No files matched your search

+2 -1
View File
@@ -508,6 +508,7 @@ impl App {
// theme, and a window that paints one frame in the default palette
// before switching is a window that flashes on every launch.
let window = crate::window::WindowMemory::new(dirs.window_file());
let notifier = crate::notify::Notifier::new(&dirs.cache);
let (engine, events) = Engine::new(runtime, dirs, cc.egui_ctx.clone())?;
theme::install_fonts(&cc.egui_ctx);
theme::apply(&cc.egui_ctx, engine.appearance());
@@ -558,7 +559,7 @@ impl App {
media_cover: None,
inhibitor: crate::inhibit::Inhibitor::new(),
shown_page: (None, 0.0),
notifier: crate::notify::Notifier::new(),
notifier,
downloads: Vec::new(),
offline_files: std::collections::HashSet::new(),
confirm_partial_delete: None,