From ac40d32ef62499d601adb62916994c0c97bb139d Mon Sep 17 00:00:00 2001 From: Sergiotarxz Date: Tue, 15 Oct 2024 23:48:49 +0200 Subject: [PATCH] Fixing badly implemented cache. --- lib/Exd/Gui/PrinterConfigure.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Exd/Gui/PrinterConfigure.pm b/lib/Exd/Gui/PrinterConfigure.pm index 82cd079..33979ce 100644 --- a/lib/Exd/Gui/PrinterConfigure.pm +++ b/lib/Exd/Gui/PrinterConfigure.pm @@ -34,6 +34,7 @@ sub _read_bluetooth_printers($self) { my @return = map {$self->app->device_hash_to_object($_)} @{JSON::from_json($line)}; $self->_bluetooth_printers(\@return); } + Exd::DeviceToBluetooth->cache_printers($self->_bluetooth_printers); } } @@ -80,11 +81,11 @@ sub start($self) { $self->_read_usb_printers; $self->_read_bluetooth_printers; $self->_update_box; - Exd::DeviceToBluetooth->cache_printers($self->_bluetooth_printers); }; return 1; }); $window->present; + $window->set_transient_for($self->app->window); } sub _update_box($self) {