~aleteoryx/muditaos

d2419d1fbdedec1571275c8f7099b51898901db7 — Pawel Olejniczak 5 years ago 1fb38b3
[EGD-6150] Clean bottom bar after unpairing last device from the list

FORGET and CONNECT/DISCONNECT buttons were not removed after
the last device was removed from the list in All Devices window.
M module-apps/application-settings-new/windows/AllDevicesWindow.cpp => module-apps/application-settings-new/windows/AllDevicesWindow.cpp +2 -0
@@ 74,6 74,8 @@ namespace gui
                                             return (bd_addr_to_str(device.address) == addressOfSelectedDevice);
                                         }),
                          devices.end());
            bottomBar->setActive(BottomBar::Side::LEFT, false);
            bottomBar->setActive(BottomBar::Side::CENTER, false);
            refreshOptionsList();
            bluetoothSettingsModel->requestDeviceUnpair(addressOfSelectedDevice);
            return true;

M module-apps/application-settings-new/windows/AllDevicesWindow.hpp => module-apps/application-settings-new/windows/AllDevicesWindow.hpp +2 -2
@@ 24,10 24,10 @@ namespace gui

        Image *leftArrowImage = nullptr;
        Image *crossImage     = nullptr;
        std::vector<Devicei> devices;
        std::vector<Devicei> devices{};
        std::string addressOfConnectedDevice;
        std::string addressOfSelectedDevice;
        std::unique_ptr<BluetoothSettingsModel> bluetoothSettingsModel;
        std::unique_ptr<BluetoothSettingsModel> bluetoothSettingsModel{};
    };

} // namespace gui