Skip to content

Commit 913cf59

Browse files
authored
🐛 Fix ignore locks when exception throws (#239)
1 parent ff87864 commit 913cf59

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ that can be found in the LICENSE file. -->
66

77
See the [Migration Guide](guides/migration_guide.md) for breaking changes between versions.
88

9+
## 4.2.1
10+
11+
### Fixes
12+
13+
- Fix ignore locks when exception throws.
14+
915
## 4.2.0
1016

1117
### Breaking changes

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: wechat_camera_picker_demo
22
description: A new Flutter project.
3-
version: 4.2.0+32
3+
version: 4.2.1+33
44
publish_to: none
55

66
environment:

lib/src/states/camera_picker_state.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ class CameraPickerState extends State<CameraPicker>
334334
return initializeLock!.future;
335335
}
336336
final lock = ignoreLocks ? initializeLock! : Completer<void>();
337-
if (ignoreLocks) {
337+
if (lock != initializeLock) {
338338
initializeLock = lock;
339339
}
340340
Future(() async {

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: wechat_camera_picker
2-
version: 4.2.0
2+
version: 4.2.1
33
description: |
44
A camera picker for Flutter projects based on WeChat's UI,
55
which is also a separate runnable extension to the

0 commit comments

Comments
 (0)