| 203 | } |
| 204 | |
| 205 | void RepopulateBrowser(Path path = Path()) |
| 206 | { |
| 207 | QueueJob( |
| 208 | [this, path]() |
| 209 | { |
| 210 | auto files = _filesystem->list(path); |
| 211 | |
| 212 | runOnUiThread( |
| 213 | [&]() |
| 214 | { |
| 215 | _filesystemModel->Clear(path); |
| 216 | for (auto& f : files) |
| 217 | _filesystemModel->Add(f); |
| 218 | |
| 219 | auto node = _filesystemModel->Find(path); |
| 220 | if (node) |
| 221 | browserTree->Expand(node->item); |
| 222 | UpdateFilesystemData(); |
| 223 | }); |
| 224 | }); |
| 225 | } |
| 226 | |
| 227 | void UpdateFilesystemData() |
| 228 | { |