Skip to content

Commit 382727e

Browse files
authored
🐛 Fix selectPredicate not being called when selecting the video asset under the WeChat Moment mode (#708)
Fixes #707.
1 parent deed2e9 commit 382727e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ that can be found in the LICENSE file. -->
2222
**Fixes**
2323

2424
- Fix semantics with the close button.
25+
- Fix `selectPredicate` not being called when selecting the video asset under the WeChat Moment mode.
2526

2627
## 9.5.1
2728

lib/src/delegates/asset_picker_viewer_builder_delegate.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,13 +793,17 @@ class DefaultAssetPickerViewerBuilderDelegate
793793
);
794794
Future<void> onPressed() async {
795795
if (isWeChatMoment && hasVideo) {
796-
Navigator.maybeOf(context)?.pop(<AssetEntity>[currentAsset]);
796+
if (await onChangingSelected(context, currentAsset, false)) {
797+
Navigator.maybeOf(context)?.pop(<AssetEntity>[currentAsset]);
798+
}
797799
return;
798800
}
801+
799802
if (provider!.isSelectedNotEmpty) {
800803
Navigator.maybeOf(context)?.pop(provider.currentlySelectedAssets);
801804
return;
802805
}
806+
803807
if (await onChangingSelected(context, currentAsset, false)) {
804808
Navigator.maybeOf(context)?.pop(
805809
selectedAssets ?? <AssetEntity>[currentAsset],

0 commit comments

Comments
 (0)