~aleteoryx/muditaos

32ead4a0514943df62c10c77c4e6a3a8f69b8221 — Michał Kamoń 5 years ago bd4f5da
[EGD-4374] meditation: fix default counter settings (#1099)

M changelog.md => changelog.md +2 -0
@@ 11,6 11,8 @@

### Fixed

* `[meditation]` Fixed default counter settings 

### Other

* `[test]` Rewritten tests and updated test documentation.

M image/assets/lang/English.json => image/assets/lang/English.json +1 -1
@@ 162,7 162,7 @@
  "app_desktop_sim_enter_pin": "Enter new PIN code",
  "app_desktop_sim_confirm_pin": "Enter new PIN code",
  "app_desktop_sim_type_puk": "To unblock it, type the PUK code:",
  "app_desktop_no_pin_lock": "<text>Press <b>Unlock</b> and then <b>#</b></text>",
  "app_desktop_press_to_unlock": "<text>Press <b>Unlock</b> and then <b>#</b></text>",
  "app_desktop_sim_wrong_pin": "Wrong PIN code",
  "app_desktop_sim_wrong_puk": "Wrong PUK code",
  "app_desktop_sim_you_have": "You have",

M module-apps/application-meditation/data/OptionsData.hpp => module-apps/application-meditation/data/OptionsData.hpp +1 -1
@@ 17,6 17,6 @@ namespace gui
        {}

        std::chrono::seconds preparationTime{5};
        bool showCounter = true;
        bool showCounter = false;
    };
} // namespace gui

M module-apps/application-meditation/widgets/MeditationModel.cpp => module-apps/application-meditation/widgets/MeditationModel.cpp +2 -2
@@ 47,7 47,7 @@ PreparationTimeModel::PreparationTimeModel(app::Application *app) : MeditationMo
void PreparationTimeModel::clearData()
{
    itemCurrentlySelected = nullptr;
    clearData();
    MeditationModel::clearData();
}

namespace


@@ 68,7 68,7 @@ void PreparationTimeModel::createData()
            itemCurrentlySelected = item;
        }

        item->activatedCallback = [this, app, item, record](gui::Item &) {
        item->activatedCallback = [this, app, item](gui::Item &) {
            LOG_DEBUG("Selecting meditation time period");
            if (itemCurrentlySelected != nullptr) {
                itemCurrentlySelected->select(false);