Skip to content

Commit

Permalink
close #176
Browse files Browse the repository at this point in the history
  • Loading branch information
madhephaestus committed Jul 24, 2024
1 parent 2792713 commit 367f6c3
Showing 1 changed file with 22 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,22 @@ public static void sort() {
while (myOptions.size() > 0) {
int bestIndex = 0;
String besturl = (String) myOptions.get(bestIndex);
long newestTime = Long.parseLong(((ArrayList<String>) ConfigurationDatabase.get(key,besturl)).get(1));
for (int i = 0; i < myOptions.size(); i++) {
String nowurl = (String) myOptions.get(i);
long myTime = Long.parseLong(((ArrayList<String>) ConfigurationDatabase.get(key,nowurl)).get(1));
if (myTime >= newestTime) {
newestTime = myTime;
besturl = nowurl;
bestIndex = i;
ArrayList<String> arrayList = (ArrayList<String>) ConfigurationDatabase.get(key,besturl);
long newestTime=0;
if(arrayList!=null)
if(arrayList.size()>1) {
newestTime= Long.parseLong(arrayList.get(1));
for (int i = 0; i < myOptions.size(); i++) {
String nowurl = (String) myOptions.get(i);
long myTime = Long.parseLong(arrayList.get(1));
if (myTime >= newestTime) {
newestTime = myTime;
besturl = nowurl;
bestIndex = i;
}
}
}
}else
continue;
String removedURL = (String) myOptions.remove(bestIndex);
if (menu.size() < maxMenueSize) {

Expand Down Expand Up @@ -180,7 +186,13 @@ public static void sort() {
//System.out.println("Workspace : " + url);
ArrayList<String> arrayList = (ArrayList<String>) ConfigurationDatabase.getObject(key,url,new ArrayList<>());
if (arrayList != null)
BowlerStudioMenu.setUpRepoMenue(workspaceMenu, url, false, false, arrayList.get(0));
if (arrayList.size() >= 0)
try {
BowlerStudioMenu.setUpRepoMenue(workspaceMenu, url, false, false,
arrayList.get(0));
} catch (Throwable t) {
t.printStackTrace();
}

}
sorting = false;
Expand Down

0 comments on commit 367f6c3

Please sign in to comment.