MCPcopy Create free account
hub / github.com/Soundux/Soundux / setSortMode

Method setSortMode

src/ui/ui.cpp:737–755  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

735 return std::nullopt;
736 }
737 std::optional<Tab> Window::setSortMode(const std::uint32_t &id, Enums::SortMode sortMode)
738 {
739 auto tab = Globals::gData.getTab(id);
740 if (tab)
741 {
742 tab->sortMode = sortMode;
743 tab->sounds = getTabContent(*tab);
744 auto newTab = Globals::gData.setTab(id, *tab);
745 if (newTab)
746 {
747 return newTab;
748 }
749 }
750
751 Fancy::fancy.logTime().failure() << "Failed to change sortMode for tab " << id << " tab does not exist"
752 << std::endl;
753 onError(Enums::ErrorCode::TabDoesNotExist);
754 return std::nullopt;
755 }
756 std::optional<Sound> Window::setHotkey(const std::uint32_t &id, const std::vector<int> &hotkeys)
757 {
758 auto sound = Globals::gData.getSound(id);

Callers

nothing calls this directly

Calls 2

getTabMethod · 0.80
setTabMethod · 0.80

Tested by

no test coverage detected