From 6fcf2ee8e74f9a6415c81b1d61fa334f528ca868 Mon Sep 17 00:00:00 2001 From: SP2FET Date: Tue, 2 Mar 2021 10:46:00 +0100 Subject: [PATCH] [EGD-5982] Fix no window refresh after pairing Fixes no refresh after finished scan --- module-apps/application-settings-new/ApplicationSettings.cpp | 2 ++ module-bluetooth/Bluetooth/BluetoothWorker.cpp | 1 - module-services/service-bluetooth/ServiceBluetooth.cpp | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/module-apps/application-settings-new/ApplicationSettings.cpp b/module-apps/application-settings-new/ApplicationSettings.cpp index 1afc1f354ecef689eeb072519b203dfbed609f0f..e9db5d66d38c0e4deb36732cd51f5e06d95aeb09 100644 --- a/module-apps/application-settings-new/ApplicationSettings.cpp +++ b/module-apps/application-settings-new/ApplicationSettings.cpp @@ -181,6 +181,8 @@ namespace app connect(typeid(BluetoothPairResultMessage), [&](sys::Message *msg) { auto bluetoothPairResultMsg = static_cast(msg); if (bluetoothPairResultMsg->status) { + bus.sendUnicast(std::make_shared<::message::bluetooth::RequestBondedDevices>(), + service::name::bluetooth); return sys::MessageNone{}; } const std::string toReplace = "%NAME"; diff --git a/module-bluetooth/Bluetooth/BluetoothWorker.cpp b/module-bluetooth/Bluetooth/BluetoothWorker.cpp index 6a7254b2062fd7f74523823b8c1da1fb75279017..6dafde60231d0ef238ff645a0bdd4939252eba66 100644 --- a/module-bluetooth/Bluetooth/BluetoothWorker.cpp +++ b/module-bluetooth/Bluetooth/BluetoothWorker.cpp @@ -258,5 +258,4 @@ void BluetoothWorker::initDevicesList() auto bondedDevicesStr = std::visit(bluetooth::StringVisitor(), settings->getValue(bluetooth::Settings::BondedDevices)); pairedDevices = SettingsSerializer::fromString(bondedDevicesStr); - LOG_INFO("Imported %d devices", pairedDevices.size()); } diff --git a/module-services/service-bluetooth/ServiceBluetooth.cpp b/module-services/service-bluetooth/ServiceBluetooth.cpp index f3dd5f139622507316826361fee017a392853822..55af09a672b75fca81de2a9e0ca693a52f5529a0 100644 --- a/module-services/service-bluetooth/ServiceBluetooth.cpp +++ b/module-services/service-bluetooth/ServiceBluetooth.cpp @@ -57,6 +57,7 @@ sys::ReturnCodes ServiceBluetooth::InitHandler() worker->run(); connect(message::bluetooth::RequestBondedDevices(), [&](sys::Message *msg) { + LOG_INFO("Requested bonded devices!"); auto bondedDevicesStr = std::visit(bluetooth::StringVisitor(), this->settingsHolder->getValue(bluetooth::Settings::BondedDevices));