Permalink
Browse files

When installing a configuration, set its last used to date to the cur…

…rent moment.
  • Loading branch information...
sk89q committed Jun 11, 2013
1 parent a5d2d8a commit 1cc6c2a3362d686ffbe54cb518a2b08bd05ca28e
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/main/java/com/sk89q/mclauncher/InstallFromURLTask.java
@@ -22,6 +22,7 @@
import java.lang.reflect.InvocationTargetException;
import java.net.MalformedURLException;
import java.net.URL;
+import java.util.Date;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
@@ -75,7 +76,7 @@ protected void execute() throws ExecutionException {
Configuration configuration =
Configuration.createInstance(
id, manifest.getName(), urlObject);
-
+ configuration.setLastLaunch(new Date());
// Update the configuration's news URL
try {
@@ -87,6 +88,7 @@ protected void execute() throws ExecutionException {
}
options.getConfigurations().register(configuration);
+ options.getConfigurations().sortByDate();
if (!options.save()) {
throw new ExecutionException(

0 comments on commit 1cc6c2a

Please sign in to comment.