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

Method refreshTab

src/ui/ui.cpp:721–736  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

719 Globals::gHotKeys.shouldNotify(false);
720 }
721 std::optional<Tab> Window::refreshTab(const std::uint32_t &id)
722 {
723 auto tab = Globals::gData.getTab(id);
724 if (tab)
725 {
726 tab->sounds = getTabContent(*tab);
727 auto newTab = Globals::gData.setTab(id, *tab);
728 if (newTab)
729 {
730 return newTab;
731 }
732 }
733 Fancy::fancy.logTime().failure() << "Failed to refresh tab " << id << " tab does not exist" << std::endl;
734 onError(Enums::ErrorCode::TabDoesNotExist);
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);

Callers

nothing calls this directly

Calls 2

getTabMethod · 0.80
setTabMethod · 0.80

Tested by

no test coverage detected