proper select last used profile

This commit is contained in:
Milos Kozak 2017-12-22 20:34:53 +01:00
parent 93b954fffe
commit 248d3d1697
2 changed files with 5 additions and 1 deletions

View file

@ -175,7 +175,7 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
profileSpinner.setAdapter(adapter);
// set selected to actual profile
for (int p = 0; p < profileList.size(); p++) {
if (profileList.get(p).equals(MainApp.getConfigBuilder().getProfileName()))
if (profileList.get(p).equals(MainApp.getConfigBuilder().getProfileName(false)))
profileSpinner.setSelection(p);
}

View file

@ -736,6 +736,10 @@ public class ConfigBuilderPlugin implements PluginBase, ConstraintsInterface, Tr
return getProfileName(System.currentTimeMillis());
}
public String getProfileName(boolean customized) {
return getProfileName(System.currentTimeMillis(), customized);
}
public String getProfileName(long time) {
return getProfileName(time, true);
}