MCPcopy Create free account
hub / github.com/chrxh/alien / createTreeTOs

Method createTreeTOs

source/Gui/BrowserWindow.cpp:1217–1237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1215}
1216
1217void BrowserWindow::createTreeTOs(Workspace& workspace)
1218{
1219 //sorting
1220 if (workspace.rawTOs.size() > 1) {
1221 std::sort(workspace.rawTOs.begin(), workspace.rawTOs.end(), [&](auto const& left, auto const& right) {
1222 return _NetworkResourceRawTO::compare(left, right, workspace.sortSpecs) < 0;
1223 });
1224 }
1225
1226 //filtering
1227 std::vector<NetworkResourceRawTO> filteredRawTOs;
1228 for (auto const& rawTO : workspace.rawTOs) {
1229 if (rawTO->matchWithFilter(_filter)) {
1230 filteredRawTOs.emplace_back(rawTO);
1231 }
1232 }
1233
1234 //create treeTOs
1235 workspace.treeTOs = NetworkResourceService::get().createTreeTOs(filteredRawTOs, workspace.collapsedFolderNames);
1236 _selectedTreeTO = nullptr;
1237}
1238
1239void BrowserWindow::sortUserList()
1240{

Callers

nothing calls this directly

Calls 4

sizeMethod · 0.80
beginMethod · 0.80
endMethod · 0.80
matchWithFilterMethod · 0.45

Tested by

no test coverage detected