mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-17 02:54:25 +00:00
HostedPrint::request_refresh asks the app for the printer list again
This commit is contained in:
@@ -547,6 +547,12 @@ impl HostedPrint {
|
||||
std::mem::take(&mut self.refresh)
|
||||
}
|
||||
|
||||
/// Asks for a printer list again on the next pass, as Refresh does: the list the app sent was not the system's
|
||||
/// (its spooler was busy).
|
||||
pub fn request_refresh(&mut self) {
|
||||
self.refresh = true;
|
||||
}
|
||||
|
||||
/// Takes the printer list the app sends; `false` while a discovery or a job runs.
|
||||
pub fn listen(&mut self, printers: Receiver<Vec<Printer>>) -> bool {
|
||||
self.state.listen(printers)
|
||||
|
||||
Reference in New Issue
Block a user