| 31 | std::map<QString, int> TwitchCategorySelection::_streamingCategories; |
| 32 | |
| 33 | void TwitchCategorySelection::PopulateCategorySelection() |
| 34 | { |
| 35 | auto token = _token.lock(); |
| 36 | if (!token && _streamingCategories.empty()) { |
| 37 | return; |
| 38 | } |
| 39 | |
| 40 | if (!_fetchingCategoriesDone && token) { |
| 41 | _categoryGrabber.Start(token); |
| 42 | if (_progressDialog->exec() == QDialog::Accepted) { |
| 43 | _fetchingCategoriesDone = true; |
| 44 | } |
| 45 | _categoryGrabber.Stop(); |
| 46 | _categoryGrabber.wait(); |
| 47 | } |
| 48 | UpdateCategoryList(); |
| 49 | } |
| 50 | |
| 51 | void TwitchCategorySelection::UpdateCategoryList() |
| 52 | { |