fix: File load achievement triggering every time a file was opened through the cli
This commit is contained in:
parent
8821f75e6b
commit
58870f3057
@ -1,10 +1,12 @@
|
||||
#include <hex/api/event.hpp>
|
||||
|
||||
#include <hex/api/localization.hpp>
|
||||
#include <hex/api/project_file_manager.hpp>
|
||||
#include <hex/api/achievement_manager.hpp>
|
||||
|
||||
#include <hex/providers/provider.hpp>
|
||||
#include <hex/ui/view.hpp>
|
||||
#include <hex/api/localization.hpp>
|
||||
#include <hex/helpers/logger.hpp>
|
||||
#include <hex/api/project_file_manager.hpp>
|
||||
|
||||
#include <imgui.h>
|
||||
|
||||
@ -105,8 +107,11 @@ namespace hex::plugin::builtin {
|
||||
newProvider->setPath(path);
|
||||
if (!newProvider->open())
|
||||
hex::ImHexApi::Provider::remove(newProvider);
|
||||
else
|
||||
else {
|
||||
EventManager::post<EventProviderOpened>(newProvider);
|
||||
AchievementManager::unlockAchievement("hex.builtin.achievement.starting_out", "hex.builtin.achievement.starting_out.open_file.name");
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
} else if (name == "Open Project") {
|
||||
|
@ -265,8 +265,6 @@ namespace hex::plugin::builtin {
|
||||
|
||||
this->m_file.close();
|
||||
|
||||
AchievementManager::unlockAchievement("hex.builtin.achievement.starting_out", "hex.builtin.achievement.starting_out.open_file.name");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user