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

Bugfix: Loading Page navigation #5

Merged
merged 1 commit into from
Mar 18, 2024
Merged

Conversation

nemoforte
Copy link
Collaborator

The purpose of this branch was to examine and fix the bug related to Loading Page navigation. It could occur at the start of the application, after clicking "Cancel connection" button and connecting to a network. In case of connecting to network from assets, there was an unexpected flipping view and the Value Notifier Exception was thrown. In case of connecting to custom network (but only unhealthy), the app navigated to DashboardPage with no network connected.

List of changes:

  • removed emit from "cancelConnection()" method in loading_page_cubit.dart. It was redundant, because adding NetworkModuleDisconnectEvent causes "_handleNetworkModuleStateChanged()", which then emits proper LoadingPageState - two states emitted in very short time caused flipping view. Also, the removed emit did not set value for NetworkModuleState, which caused "no network error".
  • modified "_mapAutoConnectEventToState()" method network_module_bloc.dart to prevent the "disconnected" status from being overwritten, in case of clicking "Cancel connection" button

The purpose of this branch was to examine and fix the bug related to Loading Page navigation. It could occur at the start of the application, after clicking "Cancel connection" button and connecting to a network. In case of connecting to network from assets, there was an unexpected flipping view and the Value Notifier Exception was thrown. In case of connecting to custom network (but only unhealthy), the app navigated to DashboardPage with no network connected.

List of changes:
 - removed emit from "cancelConnection()" method in loading_page_cubit.dart. It was redundant, because adding NetworkModuleDisconnectEvent causes "_handleNetworkModuleStateChanged()", which then emits proper LoadingPageState - two states emitted in very short time caused flipping view. Also, the removed emit did not set value for NetworkModuleState, which caused "no network error".
 - modified "_mapAutoConnectEventToState()" method network_module_bloc.dart to prevent the "disconnected" status from being overwritten, in case of clicking "Cancel connection" button
@nemoforte nemoforte requested review from kronikarz and dpajak99 March 18, 2024 09:06
@kronikarz kronikarz merged commit a46d915 into dev Mar 18, 2024
3 checks passed
@kronikarz kronikarz deleted the mj-bugfix/loading-page-navigation branch March 18, 2024 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants