Skip to content

Commit 5989bb4

Browse files
author
Federico Fissore
committed
When the cores or libraries list are empty, they get automatically updated
1 parent 357d595 commit 5989bb4

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

app/src/cc/arduino/libraries/contributions/ui/LibraryManagerUI.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import cc.arduino.ui.InstallerTableCell;
3737
import cc.arduino.utils.Progress;
3838

39+
import javax.swing.*;
3940
import java.awt.*;
4041
import java.util.Collection;
4142

@@ -110,6 +111,15 @@ public void onProgress(Progress progress) {
110111
setProgress(progress);
111112
}
112113
};
114+
115+
if (indexer.getIndex().getLibraries().isEmpty()) {
116+
SwingUtilities.invokeLater(new Runnable() {
117+
@Override
118+
public void run() {
119+
onUpdatePressed();
120+
}
121+
});
122+
}
113123
}
114124

115125
public void setProgress(Progress progress) {

app/src/cc/arduino/packages/contributions/ui/ContributionManagerUI.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import cc.arduino.ui.InstallerTableCell;
3737
import cc.arduino.utils.Progress;
3838

39+
import javax.swing.*;
3940
import java.awt.*;
4041
import java.util.Collection;
4142

@@ -108,6 +109,15 @@ public void onProgress(Progress progress) {
108109
setProgress(progress);
109110
}
110111
};
112+
113+
if (indexer.getIndex().getPackages().isEmpty()) {
114+
SwingUtilities.invokeLater(new Runnable() {
115+
@Override
116+
public void run() {
117+
onUpdatePressed();
118+
}
119+
});
120+
}
111121
}
112122

113123
public void setProgress(Progress progress) {

0 commit comments

Comments
 (0)