diff --git a/CHANGELOG.md b/CHANGELOG.md index 96d1588..69ab610 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ that can be found in the LICENSE file. --> See the [Migration Guide](guides/migration_guide.md) for breaking changes between versions. +## 4.2.1 + +### Fixes + +- Fix ignore locks when exception throws. + ## 4.2.0 ### Breaking changes diff --git a/example/pubspec.yaml b/example/pubspec.yaml index ee8f3d8..b1f9145 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,6 +1,6 @@ name: wechat_camera_picker_demo description: A new Flutter project. -version: 4.2.0+32 +version: 4.2.1+33 publish_to: none environment: diff --git a/lib/src/states/camera_picker_state.dart b/lib/src/states/camera_picker_state.dart index fb9bc66..906d683 100644 --- a/lib/src/states/camera_picker_state.dart +++ b/lib/src/states/camera_picker_state.dart @@ -334,7 +334,7 @@ class CameraPickerState extends State return initializeLock!.future; } final lock = ignoreLocks ? initializeLock! : Completer(); - if (ignoreLocks) { + if (lock != initializeLock) { initializeLock = lock; } Future(() async { diff --git a/pubspec.yaml b/pubspec.yaml index 4d313e7..8ad66d4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: wechat_camera_picker -version: 4.2.0 +version: 4.2.1 description: | A camera picker for Flutter projects based on WeChat's UI, which is also a separate runnable extension to the