Skip to content

Commit

Permalink
🐛 Fix ignore locks when exception throws (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 authored Mar 19, 2024
1 parent ff87864 commit 913cf59
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
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

0 comments on commit 913cf59

Please sign in to comment.