feat(app): desktop notifications, paste a share link anywhere

- a finished batch of downloads, and a crawl long enough to walk away
  from, notify through org.freedesktop.Notifications when the window is
  not focused; once per batch, not once per file
- Ctrl+V with a share link outside a text field opens the add form
  with the link in it
This commit is contained in:
nvrl committed 2026-10-02 20:16:27 +02:00
1 parent 959547cdc8
commit 53a1d0afda
6 files changed
+159 -4

No files matched your search

+3 -4
View File
@@ -186,6 +186,8 @@ pub enum Event {
CrawlProgress { share: String, found: usize },
/// Every requested crawl is done.
CrawlFinished,
/// A download finished; this is what it was.
Downloaded(String),
/// That share's crawl was stopped before it stored anything.
CrawlStopped { share_id: String },
/// A decoded Proton thumbnail, keyed as [`thumbnail_key`].
@@ -1145,10 +1147,7 @@ impl Engine {
item.state = DownloadState::Completed;
});
engine.load_offline_files();
engine.emit(Event::Status(format!(
"{} is available offline",
task_target.name
)));
engine.emit(Event::Downloaded(task_target.caption_or_name()));
}
Ok(DownloadEnd::Cancelled) => {
engine.update_download(&task_key, |item| item.state = DownloadState::Cancelled);