From b03511ca31eb605b48b38aad332ba666ddae2cb1 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Thu, 19 Dec 2024 12:54:06 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Use=20modified=20date=20on?= =?UTF-8?q?=20Android=20(#671)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/runnable.yml | 4 +--- CHANGELOG.md | 13 ++++++++++--- .../gradle/wrapper/gradle-wrapper.properties | 2 +- example/android/settings.gradle | 2 +- example/pubspec.yaml | 2 +- lib/src/constants/typedefs.dart | 10 +++++----- lib/src/provider/asset_picker_provider.dart | 2 +- pubspec.yaml | 2 +- 8 files changed, 21 insertions(+), 16 deletions(-) diff --git a/.github/workflows/runnable.yml b/.github/workflows/runnable.yml index d5bf1750..508e9a8d 100644 --- a/.github/workflows/runnable.yml +++ b/.github/workflows/runnable.yml @@ -46,9 +46,7 @@ jobs: - name: Run tests run: flutter test - name: Generate docs - run: | - dart pub global activate dartdoc - dart pub global run dartdoc . + run: dart doc --dry-run . test_iOS: needs: analyze diff --git a/CHANGELOG.md b/CHANGELOG.md index eaad6663..ad1c20a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,13 @@ that can be found in the LICENSE file. --> *None.* +## 9.4.2 + +### Improvements + +- Add Traditional Chinese language text delegate. (Thanks to @Gasol) +- Improves the default sort conditions on Android. + ## 9.4.1 ### Improvements @@ -169,7 +176,7 @@ that can be found in the LICENSE file. --> ### New features -- Add Korean language support. (#494) +- Add Korean language support. (Thanks to @LIMMIHEE) ### Improvements @@ -223,7 +230,7 @@ that can be found in the LICENSE file. --> ### New features - Sync all UI details from WeChat 8.3.x. (#458) -- Add Turkish language text delegate. (#331). +- Add Turkish language text delegate. (Thanks to @cevheri). - Allow to confirm 0 assets if there are selected assets previously. (#461) ### Improvements @@ -245,7 +252,7 @@ that can be found in the LICENSE file. --> ### New features -- Add Vietnamese language text delegate. (#424). +- Add Vietnamese language text delegate. (Thanks to @nploi). ### Improvements diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index d510da0c..7666e22b 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip diff --git a/example/android/settings.gradle b/example/android/settings.gradle index e62881d3..febb737b 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -20,7 +20,7 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" id "com.android.application" version "8.2.2" apply false - id "org.jetbrains.kotlin.android" version "1.9.20" apply false + id "org.jetbrains.kotlin.android" version "1.9.21" apply false } include ":app" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 8f45c489..f3a47095 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,6 +1,6 @@ name: wechat_assets_picker_demo description: The demo project for the wechat_assets_picker package. -version: 9.4.1+63 +version: 9.4.2+64 publish_to: none environment: diff --git a/lib/src/constants/typedefs.dart b/lib/src/constants/typedefs.dart index e8e5c689..631ea449 100644 --- a/lib/src/constants/typedefs.dart +++ b/lib/src/constants/typedefs.dart @@ -13,8 +13,8 @@ import 'package:provider/provider.dart'; typedef CNP = ChangeNotifierProvider; /// {@template wechat_assets_picker.LoadingIndicatorBuilder} -/// Build the loading indicator with the given [isAssetsEmpty]. -/// 根据给定的 [isAssetsEmpty] 构建加载指示器。 +/// Build the loading indicator with the given `isAssetsEmpty`. +/// 根据给定的 `isAssetsEmpty` 构建加载指示器。 /// {@endtemplate} typedef LoadingIndicatorBuilder = Widget Function( BuildContext context, @@ -66,9 +66,9 @@ typedef AssetsChangeCallback = void Function( ); /// {@template wechat_assets_picker.AssetsChangeRefreshPredicate} -/// Whether assets changing should call refresh with the given [call] -/// and the current selected [path]. -/// 判断资源变化是否根据 [call] 和当前选中的 [path] 进行更新。 +/// Whether assets changing should call refresh with the given `call` +/// and the current selected `path`. +/// 判断资源变化是否根据 `call` 和当前选中的 `path` 进行更新。 /// {@endtemplate} typedef AssetsChangeRefreshPredicate = bool Function( PermissionState permission, diff --git a/lib/src/provider/asset_picker_provider.dart b/lib/src/provider/asset_picker_provider.dart index 16ec896e..59fb26a7 100644 --- a/lib/src/provider/asset_picker_provider.dart +++ b/lib/src/provider/asset_picker_provider.dart @@ -352,7 +352,7 @@ class DefaultAssetPickerProvider )..merge(fog); } else if (fog == null && Platform.isAndroid) { options = AdvancedCustomFilter( - orderBy: [OrderByItem.desc(CustomColumns.android.dateTaken)], + orderBy: [OrderByItem.desc(CustomColumns.android.modifiedDate)], ); } else { options = fog; diff --git a/pubspec.yaml b/pubspec.yaml index b227f2db..708cb3f5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: wechat_assets_picker -version: 9.4.1 +version: 9.4.2 description: | An image picker (also with videos and audio) for Flutter projects based on WeChat's UI,