fix: state never initialized when controller is already running
Showing
1 changed file
with
0 additions
and
7 deletions
| @@ -332,13 +332,6 @@ class MobileScannerController extends ValueNotifier<MobileScannerState> { | @@ -332,13 +332,6 @@ class MobileScannerController extends ValueNotifier<MobileScannerState> { | ||
| 332 | ); | 332 | ); |
| 333 | } | 333 | } |
| 334 | } on MobileScannerException catch (error) { | 334 | } on MobileScannerException catch (error) { |
| 335 | - // If the controller is already initialized, ignore the error. | ||
| 336 | - // Starting the controller while it is already started, or in the process of starting, is redundant. | ||
| 337 | - if (error.errorCode == | ||
| 338 | - MobileScannerErrorCode.controllerAlreadyInitialized) { | ||
| 339 | - return; | ||
| 340 | - } | ||
| 341 | - | ||
| 342 | // The initialization finished with an error. | 335 | // The initialization finished with an error. |
| 343 | // To avoid stale values, reset the output size, | 336 | // To avoid stale values, reset the output size, |
| 344 | // torch state and zoom scale to the defaults. | 337 | // torch state and zoom scale to the defaults. |
-
Please register or login to post a comment