diff options
Diffstat (limited to 'src/ui/main_window/MainWindow.cpp')
-rw-r--r-- | src/ui/main_window/MainWindow.cpp | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/ui/main_window/MainWindow.cpp b/src/ui/main_window/MainWindow.cpp index 2f37e95b..d191e268 100644 --- a/src/ui/main_window/MainWindow.cpp +++ b/src/ui/main_window/MainWindow.cpp @@ -131,24 +131,30 @@ void MainWindow::Init() noexcept { info_board_->AssociateTabWidget(edit_->TabWidget()); - Module::ListenRTPublishEvent( - this, kVersionCheckingModuleID, "version.loading_done", - [=](Module::Namespace, Module::Key, int, std::any) { - FLOG_D( - "version-checking version.loading_done changed, calling slot " - "version upgrade"); - this->slot_version_upgrade_notify(); - }); - // loading process is done emit SignalLoaded(); Module::TriggerEvent("APPLICATION_LOADED"); + // check version information + auto settings = GlobalSettingStation::GetInstance().GetSettings(); + auto prohibit_update_checking = + settings.value("network/prohibit_update_checking").toBool(); + if (!prohibit_update_checking) { + Module::ListenRTPublishEvent( + this, kVersionCheckingModuleID, "version.loading_done", + [=](Module::Namespace, Module::Key, int, std::any) { + FLOG_D( + "version-checking version.loading_done changed, calling slot " + "version upgrade"); + this->slot_version_upgrade_notify(); + }); + Module::TriggerEvent("CHECK_APPLICATION_VERSION"); + } + // recover unsaved page from cache if it exists recover_editor_unsaved_pages_from_cache(); // check if need to open wizard window - auto settings = GlobalSettingStation::GetInstance().GetSettings(); auto show_wizard = settings.value("wizard/show_wizard", true).toBool(); if (show_wizard) slot_start_wizard(); |