mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
impr: Better experience when first starting ImHex (#1510)
This commit is contained in:
@@ -24,13 +24,11 @@
|
||||
|
||||
#include <fonts/codicons_font.h>
|
||||
|
||||
#include <content/popups/popup_telemetry_request.hpp>
|
||||
#include <content/recent.hpp>
|
||||
|
||||
#include <string>
|
||||
#include <random>
|
||||
#include <popups/popup_question.hpp>
|
||||
#include <hex/api/tutorial_manager.hpp>
|
||||
#include <hex/api/workspace_manager.hpp>
|
||||
|
||||
namespace hex::plugin::builtin {
|
||||
@@ -497,29 +495,6 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
});
|
||||
|
||||
EventWindowInitialized::subscribe([] {
|
||||
if (ContentRegistry::Settings::read("hex.builtin.setting.general", "hex.builtin.setting.general.prev_launch_version", "") == "") {
|
||||
ui::PopupQuestion::open("hex.builtin.popup.play_tutorial.desc"_lang,
|
||||
[]{
|
||||
TutorialManager::startTutorial("hex.builtin.tutorial.introduction");
|
||||
},
|
||||
[]{ });
|
||||
}
|
||||
|
||||
ContentRegistry::Settings::write("hex.builtin.setting.general", "hex.builtin.setting.general.prev_launch_version", ImHexApi::System::getImHexVersion());
|
||||
|
||||
// Documentation of the value above the setting definition
|
||||
auto allowServerContact = ContentRegistry::Settings::read("hex.builtin.setting.general", "hex.builtin.setting.general.server_contact", 2);
|
||||
if (allowServerContact == 2) {
|
||||
ContentRegistry::Settings::write("hex.builtin.setting.general", "hex.builtin.setting.general.server_contact", 0);
|
||||
|
||||
// Open the telemetry popup but only on desktop versions
|
||||
#if !defined(OS_WEB)
|
||||
PopupTelemetryRequest::open();
|
||||
#endif
|
||||
}
|
||||
});
|
||||
|
||||
// Clear project context if we go back to the welcome screen
|
||||
EventProviderChanged::subscribe([](const hex::prv::Provider *oldProvider, const hex::prv::Provider *newProvider) {
|
||||
hex::unused(oldProvider);
|
||||
|
||||
Reference in New Issue
Block a user