6.6.0 - Fix7 - 兼容低版本 JDK (< 22)

This commit is contained in:
SuperMonster003
2024-12-02 18:26:10 +08:00
parent 9769950fb5
commit 09c1069d16
5 changed files with 9 additions and 9 deletions

View File

@@ -43,7 +43,7 @@ public class ScriptWidgetSettingsActivity extends BaseActivity {
ExplorerView explorerView = binding.scriptList;
String workingDirPath = WorkingDirectoryUtils.getPath();
explorerView.setExplorer(mExplorer, ExplorerDirPage.createRoot(workingDirPath));
explorerView.setOnItemClickListener((_, file) -> {
explorerView.setOnItemClickListener((view, file) -> {
mSelectedScriptFilePath = file.getPath();
finish();
});

View File

@@ -34,8 +34,8 @@ class ExplorerItemViewHolder extends BindableViewHolder<Object> {
if (!(item instanceof ExplorerItem explorerItem)) return;
mExplorerItem = explorerItem;
listFileBinding.name.setText(ExplorerViewHelper.getDisplayName(fileChooseListView.getContext(), explorerItem));
listFileBinding.item.setOnClickListener(_ -> listFileBinding.checkbox.toggle());
listFileBinding.checkbox.setOnCheckedChangeListener((_, _) -> {
listFileBinding.item.setOnClickListener(view -> listFileBinding.checkbox.toggle());
listFileBinding.checkbox.setOnCheckedChangeListener((buttonView, isChecked) -> {
if (listFileBinding.checkbox.isChecked()) {
fileChooseListView.check(mExplorerItem.toScriptFile(), getAdapterPosition());
} else {

View File

@@ -35,14 +35,14 @@ class ExplorerPageViewHolder extends BindableViewHolder<Object> {
} else {
binding.checkbox.setVisibility(View.GONE);
}
binding.checkbox.setOnCheckedChangeListener((_, _) -> {
binding.checkbox.setOnCheckedChangeListener((listener, isChecked) -> {
if (binding.checkbox.isChecked()) {
fileChooseListView.check(mExplorerPage.toScriptFile(), getAdapterPosition());
} else {
fileChooseListView.getSelectedFiles().remove(mExplorerPage.toScriptFile());
}
});
binding.item.setOnClickListener(_ -> fileChooseListView.enterDirectChildPage(mExplorerPage));
binding.item.setOnClickListener(view -> fileChooseListView.enterDirectChildPage(mExplorerPage));
}
}

View File

@@ -239,7 +239,7 @@ public class TaskListRecyclerView extends ThemeColorRecyclerView {
.setFillTransparent();
itemBinding.name.setText(task.getName());
itemBinding.taskListFilePath.setText(task.getDesc());
itemBinding.stop.setOnClickListener(_ -> {
itemBinding.stop.setOnClickListener(view -> {
if (mTask != null) {
mTask.cancel();
}
@@ -267,7 +267,7 @@ public class TaskListRecyclerView extends ThemeColorRecyclerView {
super(itemView);
title = itemView.findViewById(R.id.title);
icon = itemView.findViewById(R.id.icon);
itemView.setOnClickListener(_ -> {
itemView.setOnClickListener(view -> {
if (isExpanded()) {
collapseView();
} else {