mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-10-04 17:09:25 +00:00
Increased a little the performance on common cases of the dropdown list
Signed-off-by: Mateo Pidal <pidal.mateo@gmail.com>
This commit is contained in:
@@ -78,11 +78,13 @@ void LaunchController::login()
|
||||
}
|
||||
qDebug() << "Wrote " << name << " to \"names.txt\" since it didn't exist before";
|
||||
} else {
|
||||
for(int i = 0; i < names.count(); i++){ //TODO: Improve efficiency or find a better way to do this
|
||||
if(names[i] != name){
|
||||
namesFile.write("\n"); namesFile.write(names[i].toStdString().c_str());
|
||||
if(name != names[0]){
|
||||
for(int i = 0; i < names.count(); i++){ //TODO: Improve efficiency or find a better way to do this
|
||||
if(names[i] != name){
|
||||
namesFile.write("\n"); namesFile.write(names[i].toStdString().c_str());
|
||||
}
|
||||
qDebug() << "Reordered \"names.txt\"";
|
||||
}
|
||||
qDebug() << "Reordered \"names.txt\"";
|
||||
}
|
||||
}
|
||||
namesFile.flush();
|
||||
|
Reference in New Issue
Block a user