60{
61 const auto response {[this](const int result) {
62#ifndef MIDI2LR_BETA
63 if (result) {
64 if (juce::URL("https://github.com/rsjaffe/MIDI2LR/releases")
65 .launchInDefaultBrowser()) {
67 }
68 }
69 else {
71 }
72#else
73 if (result) {
74 std::ignore =
75 juce::URL("https://github.com/rsjaffe/MIDI2LR/releases").launchInDefaultBrowser();
76 }
77#endif
78 }};
79
80 try {
82 juce::NativeMessageBox::showYesNoBox(juce::AlertWindow::AlertIconType::QuestionIcon,
83 fmt::format(juce::translate("A new version of {} is available.").toStdString(),
84 "MIDI2LR"),
85 juce::translate("Do you want to download the latest version?") + ' '
87 nullptr, juce::ModalCallbackFunction::create(response));
88 }
89 catch (const std::exception& e) {
91 }
92}
void SetLastVersionFound(int version_number)
Definition SettingsManager.h:70
int new_version_
Definition VersionChecker.h:41
std::atomic< bool > thread_should_exit_
Definition VersionChecker.h:43
void ExceptionResponse(gsl::czstring id, gsl::czstring fu, const std::exception &e) noexcept