From 9adf1e91f84a53b3b4c2b3723d1d05363ed14933 Mon Sep 17 00:00:00 2001 From: Corentin Lecouvey Date: Tue, 21 Oct 2014 18:51:58 +0200 Subject: [PATCH] remove device from list and show scan button when unpairing After unpairing a device, this device is no more a known device. It should be removed from the list before refreshing it. Also propose to display the scan button after unpairing. Change-Id: Ib896bc79bf5fe79cc764fb538922bd018742f024 Signed-off-by: Corentin Lecouvey --- css/car/components/settings/js/bluetooth.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/css/car/components/settings/js/bluetooth.js b/css/car/components/settings/js/bluetooth.js index 3a9a2f8..0efcd82 100644 --- a/css/car/components/settings/js/bluetooth.js +++ b/css/car/components/settings/js/bluetooth.js @@ -156,6 +156,8 @@ var Bluetooth = function() { showLoadingSpinner("Unpairing"); self.adapter().destroyBonding(device.address, function() { console.log('bluetooth unpaired from ' + device.address); + self.removeDevice(device.address); + self.scan(true); self._restartRefreshDevicesInterval(); hideLoadingSpinner("Unpairing"); }, function(e) { -- 2.7.4