Skip to content

Commit 23c0b85

Browse files
committed
Update ListAllInteractor.java
1 parent 3d99dff commit 23c0b85

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/main/java/org/hydev/mcpm/client/list/ListAllInteractor.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
import org.hydev.mcpm.client.database.inputs.CheckForUpdatesResult;
77
import org.hydev.mcpm.client.database.model.PluginVersionState;
88
import org.hydev.mcpm.client.models.PluginYml;
9-
import org.hydev.mcpm.client.models.PluginTrackerModel;
10-
import org.hydev.mcpm.client.database.model.PluginVersionId;
11-
import org.hydev.mcpm.client.database.model.PluginModelId;
12-
import org.hydev.mcpm.client.models.PluginModel;
9+
import org.hydev.mcpm.client.updater.CheckForUpdatesBoundary;
1310

1411
import java.util.List;
1512
import java.util.ArrayList;
@@ -22,9 +19,7 @@
2219
* @author Kevin (https://github.com/kchprog)
2320
* @since 2022-11-20
2421
*/
25-
public class ListAllInteractor implements ListAllBoundary {
26-
SuperLocalPluginTracker localPluginTracker = new SuperLocalPluginTracker();
27-
22+
public record ListAllInteractor(PluginTracker tracker) implements ListAllBoundary {
2823
/**
2924
* listAllInteractor interacts with the LocalPluginTracker to get the list of
3025
* plugins, according to a specified
@@ -38,7 +33,7 @@ public class ListAllInteractor implements ListAllBoundary {
3833
* outdated.
3934
*/
4035
public List<PluginYml> listAll(String parameter, CheckForUpdatesBoundary checkForUpdatesBoundary) {
41-
var installed = localPluginTracker.listInstalled();
36+
var installed = tracker.listInstalled();
4237
switch (parameter) {
4338
case "all":
4439
return installed;

0 commit comments

Comments
 (0)