~aleteoryx/muditaos

f3f98bbe7d7624daf9f52d167f429ba5667d19ae — rrandomsky 1 year, 10 months ago 32c6769
[BH-1635] Fix for low battery notification on the home screen 2

Now the low battery warning window is visible for 6 seconds.
1 files changed, 3 insertions(+), 0 deletions(-)

M products/BellHybrid/apps/common/src/windows/BellBatteryStatusWindow.cpp
M products/BellHybrid/apps/common/src/windows/BellBatteryStatusWindow.cpp => products/BellHybrid/apps/common/src/windows/BellBatteryStatusWindow.cpp +3 -0
@@ 31,6 31,8 @@ namespace
    constexpr auto windowLongTimeout{12s};
    // default screen timeout
    constexpr auto windowDefaultTimeout{3s};
    // default screen timeout for low battery warning
    constexpr auto windowDefaultTimeoutForLowBatteryWarning{6s};
} // namespace

namespace gui


@@ 129,6 131,7 @@ namespace gui
                auto tokenMap = text::RichTextParser::TokenMap({{"$BATTERY", std::to_string(soc)}});
                bottomDescription->setRichText(utils::translate("battery_remaining"), std::move(tokenMap));
                chargingIcon->setVisible(false);
                resetTimer(windowDefaultTimeoutForLowBatteryWarning);
            }
            else {
                topDescription->setText(utils::translate("app_settings_tech_info_battery"));