Skip to content

Commit a910c83

Browse files
committed
chore(ci):Update file info display format and replace OpenFileManager with openFileManager API
1 parent 1f972a0 commit a910c83

File tree

2 files changed

+27
-8
lines changed

2 files changed

+27
-8
lines changed

android/app/build.gradle

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,15 @@ android {
9494

9595
android.applicationVariants.all { variant ->
9696
variant.outputs.all { output ->
97-
//noinspection GrDeprecatedAPIUsage
98-
def abiName = output.getFilter(com.android.build.OutputFile.ABI)
99-
if (abiName == null)
97+
def abiName = null
98+
if (output.filters != null && !output.filters.isEmpty()) {
99+
abiName = output.filters.find { it.filterType == com.android.build.OutputFile.ABI }?.identifier
100+
}
101+
if (abiName == null) {
100102
output.outputFileName = "OpenListF-v${variant.versionName}.apk"
101-
else
103+
} else {
102104
output.outputFileName = "OpenListF-v${variant.versionName}_${abiName}.apk"
105+
}
103106
}
104107
}
105108

lib/pages/download_manager_page.dart

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,8 @@ class _DownloadManagerPageState extends State<DownloadManagerPage>
423423
subtitle: Column(
424424
crossAxisAlignment: CrossAxisAlignment.start,
425425
children: [
426-
Text(S.of(context).fileSize(_formatFileSize(stat.size))),
427-
Text(S.of(context).fileTime(_formatDateTime(stat.modified))),
426+
Text('${S.of(context).size}: ${_formatFileSize(stat.size)}'),
427+
Text('${S.of(context).modifiedTime}: ${_formatDateTime(stat.modified)}'),
428428
],
429429
),
430430
trailing: const Icon(Icons.more_vert),
@@ -722,7 +722,15 @@ class _DownloadManagerPageState extends State<DownloadManagerPage>
722722
String directoryPath = filePath.substring(0, filePath.lastIndexOf('/'));
723723

724724
// 尝试打开文件管理器并定位到文件
725-
await OpenFileManager.open(directoryPath);
725+
await openFileManager(
726+
androidConfig: AndroidConfig(
727+
folderType: AndroidFolderType.other,
728+
folderPath: directoryPath,
729+
),
730+
iosConfig: IosConfig(
731+
folderPath: directoryPath,
732+
),
733+
);
726734

727735
Get.showSnackbar(GetSnackBar(
728736
message: S.of(context).fileManagerOpened,
@@ -741,7 +749,15 @@ class _DownloadManagerPageState extends State<DownloadManagerPage>
741749
Future<void> _openDownloadDirectory() async {
742750
if (_downloadPath != null) {
743751
try {
744-
await OpenFileManager.open(_downloadPath!);
752+
await openFileManager(
753+
androidConfig: AndroidConfig(
754+
folderType: AndroidFolderType.other,
755+
folderPath: _downloadPath!,
756+
),
757+
iosConfig: IosConfig(
758+
folderPath: _downloadPath!,
759+
),
760+
);
745761
Get.showSnackbar(GetSnackBar(
746762
message: S.of(context).downloadDirectoryOpened,
747763
duration: const Duration(seconds: 2),

0 commit comments

Comments
 (0)