~aleteoryx/muditaos

482d53450e6b3b7152b41e0fd32a6c9cfdabfc06 — Lefucjusz 3 years ago 6108ebe
[MOS-906] Fix missing tick mark in ringtones list

Fix of the missing tick mark that should appear
on the currently selected ringtone, but didn't.
M module-apps/application-settings/models/apps/SoundsModel.cpp => module-apps/application-settings/models/apps/SoundsModel.cpp +1 -1
@@ 97,7 97,7 @@ void SoundsModel::applyItems(const std::vector<std::filesystem::path> &sounds,
    auto currentItemIndex  = 0;
    auto selectedItemIndex = 0;

    const auto selectedSound = purefs::dir::getAssetsDirPath() / model->getSound();
    const auto selectedSound = purefs::dir::getSystemDiskPath() / model->getSound();
    for (const auto &sound : sounds) {

        bool isSelected = false;

M module-apps/application-settings/windows/apps/SoundSelectWindow.cpp => module-apps/application-settings/windows/apps/SoundSelectWindow.cpp +2 -3
@@ 4,7 4,6 @@
#include "SoundSelectWindow.hpp"

#include <application-settings/data/SoundSelectData.hpp>
#include <application-settings/models/apps/SoundsModel.hpp>

#include <ListView.hpp>
#include <i18n/i18n.hpp>


@@ 14,7 13,7 @@ namespace gui
    SoundSelectWindow::SoundSelectWindow(app::ApplicationCommon *app,
                                         std::string name,
                                         std::shared_ptr<AbstractSoundsModel> model)
        : AppWindow(app, name), mSoundsModel{std::move(model)}
        : AppWindow(app, std::move(name)), mSoundsModel{std::move(model)}
    {
        buildInterface();
    }


@@ 51,7 50,7 @@ namespace gui

    void SoundSelectWindow::onBeforeShow([[maybe_unused]] ShowMode mode, SwitchData *data)
    {
        auto info = dynamic_cast<SoundSelectData *>(data);
        const auto info = dynamic_cast<SoundSelectData *>(data);
        if (info == nullptr) {
            LOG_ERROR("Null switch data pointer!");
            return;