[CP-1842] Extremely long title tag causes delay when loading Relaxation songs list Fixed by limiting the maximum text length in relaxation main window
2 files changed, 7 insertions(+), 1 deletions(-) M harmony_changelog.md M products/BellHybrid/apps/application-bell-relaxation/windows/RelaxationMainWindow.cpp
M harmony_changelog.md => harmony_changelog.md +1 -0
@@ 13,6 13,7 @@ * Fixed problems with displaying file names in Relaxation * Fixed polish Meditation summary text * Fixed problems with copying files via Mudita Center to Relaxation * Fixed problem with long Relaxation loading when titles were too long ### Added
M products/BellHybrid/apps/application-bell-relaxation/windows/RelaxationMainWindow.cpp => products/BellHybrid/apps/application-bell-relaxation/windows/RelaxationMainWindow.cpp +6 -1
@@ 8,6 8,11 @@ #include <common/options/OptionBellMenu.hpp> #include <i18n/i18n.hpp> namespace { constexpr auto maxDisplayedTitleLength = 30U; } namespace gui { RelaxationMainWindow::RelaxationMainWindow( @@ 25,7 30,7 @@ namespace gui std::list<gui::Option> menuOptionList; auto addRecord = [&](const db::multimedia_files::MultimediaFilesRecord &sound) { menuOptionList.emplace_back(std::make_unique<gui::option::OptionBellMenu>( sound.tags.title, sound.tags.title.substr(0, maxDisplayedTitleLength), [=](gui::Item &item) { onActivated(sound); return true;