~aleteoryx/muditaos

68e0d508261c4b14d6b0b9181d82d41ff50bd568 — tkros 4 years ago 7b54a44
[EGD-7856] MP loosing track list offset

When MP track list is open and volume changed, the list is loosing the
offset.
M module-apps/application-music-player/windows/MusicPlayerAllSongsWindow.cpp => module-apps/application-music-player/windows/MusicPlayerAllSongsWindow.cpp +0 -12
@@ 22,12 22,6 @@ namespace gui
        buildInterface();
    }

    void MusicPlayerAllSongsWindow::rebuild()
    {
        destroyInterface();
        buildInterface();
    }

    void MusicPlayerAllSongsWindow::buildInterface()
    {
        presenter->attach(this);


@@ 63,16 57,10 @@ namespace gui
        setFocusItem(songsList);
    }

    void MusicPlayerAllSongsWindow::destroyInterface()
    {
        erase();
    }

    void MusicPlayerAllSongsWindow::onBeforeShow([[maybe_unused]] ShowMode mode, [[maybe_unused]] SwitchData *data)
    {
        presenter->attach(this);
        presenter->createData();
        songsList->rebuildList(listview::RebuildType::OnPageElement);
    }

    void MusicPlayerAllSongsWindow::updateSongsState(std::optional<db::multimedia_files::MultimediaFilesRecord> record,

M module-apps/application-music-player/windows/MusicPlayerAllSongsWindow.hpp => module-apps/application-music-player/windows/MusicPlayerAllSongsWindow.hpp +0 -2
@@ 19,9 19,7 @@ namespace gui

        void onBeforeShow([[maybe_unused]] ShowMode mode, [[maybe_unused]] SwitchData *data) override;

        void rebuild() override;
        void buildInterface() override;
        void destroyInterface() override;
        bool onInput(const InputEvent &inputEvent) override;

        void updateSongsState(std::optional<db::multimedia_files::MultimediaFilesRecord> record,

M module-gui/gui/widgets/ListViewEngine.cpp => module-gui/gui/widgets/ListViewEngine.cpp +2 -2
@@ 279,7 279,7 @@ namespace gui
        // Orientations.
        if (orientation == listview::Orientation::TopBottom && direction == listview::Direction::Top &&
            startIndex == 0) {
            if (body->getPrimarySizeLeft() > provider->getMinimalItemSpaceRequired()) {
            if (body->getPrimarySizeLeft() >= provider->getMinimalItemSpaceRequired()) {
                focusOnLastItem = true;

                if (checkFullRenderRequirementCallback) {


@@ 291,7 291,7 @@ namespace gui

        if (orientation == listview::Orientation::BottomTop && direction == listview::Direction::Bottom &&
            startIndex + currentPageSize == elementsCount) {
            if (body->getPrimarySizeLeft() > provider->getMinimalItemSpaceRequired()) {
            if (body->getPrimarySizeLeft() >= provider->getMinimalItemSpaceRequired()) {
                focusOnLastItem = true;

                if (checkFullRenderRequirementCallback) {