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; ExplorerView explorerView = binding.scriptList;
String workingDirPath = WorkingDirectoryUtils.getPath(); String workingDirPath = WorkingDirectoryUtils.getPath();
explorerView.setExplorer(mExplorer, ExplorerDirPage.createRoot(workingDirPath)); explorerView.setExplorer(mExplorer, ExplorerDirPage.createRoot(workingDirPath));
explorerView.setOnItemClickListener((_, file) -> { explorerView.setOnItemClickListener((view, file) -> {
mSelectedScriptFilePath = file.getPath(); mSelectedScriptFilePath = file.getPath();
finish(); finish();
}); });

View File

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

View File

@@ -35,14 +35,14 @@ class ExplorerPageViewHolder extends BindableViewHolder<Object> {
} else { } else {
binding.checkbox.setVisibility(View.GONE); binding.checkbox.setVisibility(View.GONE);
} }
binding.checkbox.setOnCheckedChangeListener((_, _) -> { binding.checkbox.setOnCheckedChangeListener((listener, isChecked) -> {
if (binding.checkbox.isChecked()) { if (binding.checkbox.isChecked()) {
fileChooseListView.check(mExplorerPage.toScriptFile(), getAdapterPosition()); fileChooseListView.check(mExplorerPage.toScriptFile(), getAdapterPosition());
} else { } else {
fileChooseListView.getSelectedFiles().remove(mExplorerPage.toScriptFile()); 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(); .setFillTransparent();
itemBinding.name.setText(task.getName()); itemBinding.name.setText(task.getName());
itemBinding.taskListFilePath.setText(task.getDesc()); itemBinding.taskListFilePath.setText(task.getDesc());
itemBinding.stop.setOnClickListener(_ -> { itemBinding.stop.setOnClickListener(view -> {
if (mTask != null) { if (mTask != null) {
mTask.cancel(); mTask.cancel();
} }
@@ -267,7 +267,7 @@ public class TaskListRecyclerView extends ThemeColorRecyclerView {
super(itemView); super(itemView);
title = itemView.findViewById(R.id.title); title = itemView.findViewById(R.id.title);
icon = itemView.findViewById(R.id.icon); icon = itemView.findViewById(R.id.icon);
itemView.setOnClickListener(_ -> { itemView.setOnClickListener(view -> {
if (isExpanded()) { if (isExpanded()) {
collapseView(); collapseView();
} else { } else {

View File

@@ -1,5 +1,5 @@
#Mon Dec 02 18:03:28 CST 2024 #Mon Dec 02 18:24:43 CST 2024
BUILD_TIME=1733133808639 BUILD_TIME=1733135083804
COMPILE_SDK_VERSION=34 COMPILE_SDK_VERSION=34
JAVA_VERSION=23 JAVA_VERSION=23
JAVA_VERSION_MIN_RADICAL=0 JAVA_VERSION_MIN_RADICAL=0