Skip to content

Commit 2d57008

Browse files
authored
🐛 Fix reverted preview assets (#593)
1 parent 67331b9 commit 2d57008

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ that can be found in the LICENSE file. -->
77
> [!IMPORTANT]
88
> See the [Migration Guide](guides/migration_guide.md) for the details of breaking changes between versions.
99
10+
## 9.0.5
11+
12+
### Fixes
13+
14+
- Fix reverted index when previewing assets on Android.
15+
1016
## 9.0.4
1117

1218
### Fixes

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: wechat_assets_picker_demo
22
description: The demo project for the wechat_assets_picker package.
3-
version: 9.0.4+53
3+
version: 9.0.5+54
44
publish_to: none
55

66
environment:

lib/src/delegates/asset_picker_builder_delegate.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,9 @@ class DefaultAssetPickerBuilderDelegate
914914
selected = p.selectedAssets;
915915
if (index == null) {
916916
current = p.selectedAssets;
917-
current = current.reversed.toList(growable: false);
917+
if (revert) {
918+
current = current.reversed.toList(growable: false);
919+
}
918920
effectiveIndex = selected.indexOf(currentAsset);
919921
} else {
920922
current = p.currentAssets;

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: wechat_assets_picker
2-
version: 9.0.4
2+
version: 9.0.5
33
description: |
44
An image picker (also with videos and audio)
55
for Flutter projects based on WeChat's UI,

0 commit comments

Comments
 (0)