| 408 | m_tipsThread = new std::thread(getTips, onFetch); |
| 409 | } |
| 410 | void WebAPI::FetchChangelog(std::function<void(const std::string&)> onFetch) |
| 411 | { |
| 412 | Logger::Get().Log("Fetching changelog with WebAPI"); |
| 413 | |
| 414 | if (m_changelogThread != nullptr && m_changelogThread->joinable()) |
| 415 | m_changelogThread->join(); |
| 416 | delete m_changelogThread; |
| 417 | m_changelogThread = new std::thread(getChangelog, onFetch); |
| 418 | } |
| 419 | void WebAPI::CheckForApplicationUpdates(std::function<void()> onUpdate) |
| 420 | { |
| 421 | Logger::Get().Log("Checking for updates with WebAPI"); |