File tree Expand file tree Collapse file tree 1 file changed +5
-15
lines changed
app/src/cc/arduino/contributions/libraries/ui Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Original file line number Diff line number Diff line change 2929
3030package cc .arduino .contributions .libraries .ui ;
3131
32- import cc .arduino .contributions .libraries .ContributedLibraryRelease ;
33- import cc .arduino .contributions .libraries .ContributedLibrary ;
34- import cc .arduino .contributions .ui .DropdownItem ;
32+ import static processing .app .I18n .tr ;
3533
36- import java .util .Optional ;
3734import java .util .function .Predicate ;
3835
39- import static processing .app .I18n .tr ;
36+ import cc .arduino .contributions .libraries .ContributedLibrary ;
37+ import cc .arduino .contributions .libraries .filters .UpdatableLibraryPredicate ;
38+ import cc .arduino .contributions .ui .DropdownItem ;
4039
4140public class DropdownUpdatableLibrariesItem implements DropdownItem <ContributedLibrary > {
4241
4342 @ Override
4443 public Predicate <ContributedLibrary > getFilterPredicate () {
45- return new Predicate <ContributedLibrary >() {
46- @ Override
47- public boolean test (ContributedLibrary lib ) {
48- Optional <ContributedLibraryRelease > mayInstalled = lib .getInstalled ();
49- if (!mayInstalled .isPresent ()) {
50- return false ;
51- }
52- return !lib .getLatest ().equals (mayInstalled .get ());
53- }
54- };
44+ return new UpdatableLibraryPredicate ();
5545 }
5646
5747 @ Override
You can’t perform that action at this time.
0 commit comments