~aleteoryx/muditaos

72ac24f2e8ec5a260021bf96d4ce74444f90e9ce — Pawel Olejniczak 5 years ago 9f87dea
[EGD-6073] Fix text formatting in retry windows

Error message in retry windows was displayed incorrectly.
M image/assets/lang/English.json => image/assets/lang/English.json +4 -4
@@ 324,10 324,10 @@
  "app_settings_bluetooth_phone_name": "Phone name",
  "app_settings_bluetooth_phone_visibility": "Phone visibility",
  "app_settings_bluetooth_enter_passkey": "Enter passkey:",
  "app_settings_bluetooth_init_error_message": "<text font='gt_pressura' weight='regular' size='27'>Bluetooth initialization process has failed. </text> <text font='gt_pressura' weight='bold' size='27'>TRY AGAIN.</text>",
  "app_settings_bluetooth_pairing_error_message": "<text font='gt_pressura' weight='regular' size='27'>Pairing process has failed. Check the device and</text> <text font='gt_pressura' weight='bold' size='27'>TRY AGAIN.</text>",
  "app_settings_bluetooth_unpairing_error_message": "<text font='gt_pressura' weight='regular' size='27'>Unpairing process has failed. Check the device and</text> <text font='gt_pressura' weight='bold' size='27'>TRY AGAIN.</text>",
  "app_settings_bluetooth_connecting_error_message": "<text font='gt_pressura' weight='regular' size='27'>Connection process has failed. Check the device and</text> <text font='gt_pressura' weight='bold' size='27'>TRY AGAIN.</text>",
  "app_settings_bluetooth_init_error_message": "<text font='gt_pressura' weight='regular' size='27'>Bluetooth initialization process has failed.</text>",
  "app_settings_bluetooth_pairing_error_message": "<text font='gt_pressura' weight='regular' size='27'>Pairing process has failed.<br></br>Check the device and </text> <text font='gt_pressura' weight='bold' size='27'>TRY AGAIN.</text>",
  "app_settings_bluetooth_unpairing_error_message": "<text font='gt_pressura' weight='regular' size='27'>Unpairing process has failed.<br></br>Check the device and </text> <text font='gt_pressura' weight='bold' size='27'>TRY AGAIN.</text>",
  "app_settings_bluetooth_connecting_error_message": "<text font='gt_pressura' weight='regular' size='27'>Connection process has failed.<br></br>Check the device and </text> <text font='gt_pressura' weight='bold' size='27'>TRY AGAIN.</text>",
  "app_settings_net": "Network",
  "app_settings_disp_key": "Display and keypad",
  "app_settings_display_display_light": "Display light",

M module-apps/application-settings-new/ApplicationSettings.cpp => module-apps/application-settings-new/ApplicationSettings.cpp +3 -3
@@ 190,7 190,7 @@ namespace app
                         gui::ShowMode::GUI_SHOW_INIT,
                         std::make_unique<gui::DialogMetadataMessage>(
                             gui::DialogMetadata{utils::localize.get("app_settings_bt"),
                                                 "search_big",
                                                 "info_big_circle_W_G",
                                                 utils::localize.get("app_settings_bluetooth_pairing_error_message"),
                                                 "",
                                                 [=]() -> bool {


@@ 220,7 220,7 @@ namespace app
                         gui::ShowMode::GUI_SHOW_INIT,
                         std::make_unique<gui::DialogMetadataMessage>(
                             gui::DialogMetadata{utils::localize.get("app_settings_bt"),
                                                 "search_big",
                                                 "info_big_circle_W_G",
                                                 utils::localize.get("app_settings_bluetooth_unpairing_error_message"),
                                                 "",
                                                 [=]() -> bool {


@@ 244,7 244,7 @@ namespace app
                         gui::ShowMode::GUI_SHOW_INIT,
                         std::make_unique<gui::DialogMetadataMessage>(gui::DialogMetadata{
                             utils::localize.get("app_settings_bt"),
                             "search_big",
                             "info_big_circle_W_G",
                             utils::localize.get("app_settings_bluetooth_connecting_error_message"),
                             "",
                             [=]() -> bool {

M module-bluetooth/Bluetooth/interface/profiles/GAP/GAP.cpp => module-bluetooth/Bluetooth/interface/profiles/GAP/GAP.cpp +1 -2
@@ 200,8 200,7 @@ namespace bluetooth
    {
        auto result = packet[2];

        auto msg =
            std::make_shared<BluetoothPairResultMessage>(currentlyProcessedDeviceAddr, std::string{}, result == 0u);
        auto msg = std::make_shared<BluetoothPairResultMessage>(currentlyProcessedDeviceAddr, result == 0u);
        currentlyProcessedDeviceAddr.clear();
        ownerService->bus.sendUnicast(std::move(msg), "ApplicationSettingsNew");
    }

M module-services/service-bluetooth/service-bluetooth/BluetoothMessage.hpp => module-services/service-bluetooth/service-bluetooth/BluetoothMessage.hpp +2 -7
@@ 58,18 58,13 @@ class BluetoothScanResultMessage : public sys::DataMessage
class BluetoothPairResultMessage : public sys::DataMessage
{
  public:
    explicit BluetoothPairResultMessage(std::string addr, std::string name, bool succeed)
        : sys::DataMessage(MessageType::BluetoothPairResult), addr(std::move(addr)), name(std::move(name)),
          succeed(succeed)
    explicit BluetoothPairResultMessage(std::string addr, bool succeed)
        : sys::DataMessage(MessageType::BluetoothPairResult), addr(std::move(addr)), succeed(succeed)
    {}
    [[nodiscard]] auto getAddr() const -> std::string
    {
        return addr;
    }
    [[nodiscard]] auto getName() const -> std::string
    {
        return name;
    }
    [[nodiscard]] auto isSucceed() const noexcept -> bool
    {
        return succeed;