fix OnLocaleInstalled notification
This commit is contained in:
parent
5359e35ded
commit
65c34ee076
|
|
@ -15,7 +15,7 @@ namespace Nz
|
||||||
using Dependencies = TypeList<Core>;
|
using Dependencies = TypeList<Core>;
|
||||||
struct Config {};
|
struct Config {};
|
||||||
|
|
||||||
NazaraStaticSignal(OnLocalesInstalled, const std::vector<std::string>&);
|
NazaraStaticSignal(OnLocaleInstalled, std::string_view);
|
||||||
|
|
||||||
Localization(Config config);
|
Localization(Config config);
|
||||||
~Localization();
|
~Localization();
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
namespace Nz
|
namespace Nz
|
||||||
{
|
{
|
||||||
Localization* Localization::s_instance = nullptr;
|
Localization* Localization::s_instance = nullptr;
|
||||||
NazaraStaticSignalImpl(Localization, OnLocalesInstalled);
|
NazaraStaticSignalImpl(Localization, OnLocaleInstalled);
|
||||||
|
|
||||||
Localization::Localization(Config /*config*/)
|
Localization::Localization(Config /*config*/)
|
||||||
: ModuleBase("Localization", this)
|
: ModuleBase("Localization", this)
|
||||||
|
|
@ -64,11 +64,8 @@ namespace Nz
|
||||||
|
|
||||||
if (oldLocalesCount != newLocalesCount)
|
if (oldLocalesCount != newLocalesCount)
|
||||||
{
|
{
|
||||||
std::vector<std::string> v;
|
for (size_t i = oldLocalesCount; i < newLocalesCount; ++i)
|
||||||
for (size_t i = oldLocalesCount - 1; i < newLocalesCount - 1; ++i)
|
OnLocaleInstalled(m_locales[i].name);
|
||||||
v.push_back(m_locales[i].name);
|
|
||||||
|
|
||||||
OnLocalesInstalled(v);
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue