Fix unlocked TUI visibility and clipboard feedback

This commit is contained in:
2026-08-10 18:32:57 +02:00
parent 2eef49c5c3
commit 75d4ead3d8
8 changed files with 673 additions and 288 deletions

View File

@@ -227,6 +227,22 @@ impl AsyncExecutor {
}
}
pub fn clipboard_started_reporter(
&self,
token: RequestToken,
) -> impl Fn(crate::app::ClipboardPresentationId, std::time::Instant) + Send + 'static {
let sender = self.sender.clone();
move |presentation, deadline| {
let _ignored = sender.send(AsyncResult {
token,
payload: Ok(AsyncPayload::ClipboardStarted {
presentation,
deadline,
}),
});
}
}
pub fn drain(&self) -> impl Iterator<Item = AsyncResult> + '_ {
self.receiver.try_iter()
}