From c6720cdaa10c949c4dc6be3420b064ca7b1c81ac Mon Sep 17 00:00:00 2001 From: Alex Li Date: Fri, 8 Nov 2024 13:22:14 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Allows=20assets=20changing=20whe?= =?UTF-8?q?n=20no=20path=20previously=20(#656)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves https://github.com/fluttercandies/flutter_photo_manager/issues/1215 --- CHANGELOG.md | 4 +++- lib/src/delegates/asset_picker_builder_delegate.dart | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e69eff09..8af74669 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,9 @@ that can be found in the LICENSE file. --> ## Unreleased -*None.* +### Fixes + +- Allows assets changing when no path previously. ## 9.3.3 diff --git a/lib/src/delegates/asset_picker_builder_delegate.dart b/lib/src/delegates/asset_picker_builder_delegate.dart index cff1802c..aa85ec03 100644 --- a/lib/src/delegates/asset_picker_builder_delegate.dart +++ b/lib/src/delegates/asset_picker_builder_delegate.dart @@ -901,7 +901,7 @@ class DefaultAssetPickerBuilderDelegate if (assetsChangeRefreshPredicate != null) { return assetsChangeRefreshPredicate!(permission, call, path); } - return path?.isAll == true; + return path?.isAll ?? true; } if (!predicate()) {