[Changelog]: Re-order urls
This commit is contained in:
@ -7,44 +7,44 @@ namespace Components
|
||||
|
||||
void Changelog::LoadChangelog()
|
||||
{
|
||||
//if (!Changelog::Lines.empty())
|
||||
// return;
|
||||
std::lock_guard _(Mutex);
|
||||
Lines.clear();
|
||||
|
||||
std::lock_guard<std::mutex> _(Changelog::Mutex);
|
||||
Changelog::Lines.clear();
|
||||
std::string data = Utils::Cache::GetFile("/develop/CHANGELOG.md");
|
||||
const auto data = Utils::Cache::GetFile("/develop/CHANGELOG.md");
|
||||
|
||||
if (data.empty())
|
||||
{
|
||||
data = "^1Unable to get changelog.";
|
||||
Lines.emplace_back("^1Unable to get changelog.");
|
||||
return;
|
||||
}
|
||||
|
||||
Changelog::Lines = Utils::String::Split(data, '\n');
|
||||
|
||||
for (auto& line : Changelog::Lines)
|
||||
auto buffer = Utils::String::Split(data, '\n');
|
||||
for (auto& line : buffer)
|
||||
{
|
||||
Utils::String::Replace(line, "\r", "");
|
||||
}
|
||||
|
||||
Lines = buffer;
|
||||
}
|
||||
|
||||
unsigned int Changelog::GetChangelogCount()
|
||||
{
|
||||
return Changelog::Lines.size();
|
||||
return Lines.size();
|
||||
}
|
||||
|
||||
// Omit column here
|
||||
const char* Changelog::GetChangelogText(unsigned int item, int /*column*/)
|
||||
const char* Changelog::GetChangelogText(unsigned int item, [[maybe_unused]] int column)
|
||||
{
|
||||
std::lock_guard<std::mutex> _(Changelog::Mutex);
|
||||
if (item < Changelog::Lines.size())
|
||||
std::lock_guard _(Mutex);
|
||||
if (item < Lines.size())
|
||||
{
|
||||
return Utils::String::VA("%s", Changelog::Lines[item].data());
|
||||
return Utils::String::VA("%s", Lines[item].data());
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
void Changelog::SelectChangelog(unsigned int /*index*/)
|
||||
void Changelog::SelectChangelog([[maybe_unused]] unsigned int index)
|
||||
{
|
||||
// Don't do anything in here
|
||||
}
|
||||
|
Reference in New Issue
Block a user