Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fix ignore locks when exception throws #239

Merged
merged 2 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion lib/src/states/camera_picker_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ class CameraPickerState extends State<CameraPicker>
return initializeLock!.future;
}
final lock = ignoreLocks ? initializeLock! : Completer<void>();
if (ignoreLocks) {
if (lock != initializeLock) {
initializeLock = lock;
}
Future(() async {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading