CollActionteam / collaction_app

CollAction cross-platform mobile application for iOS and Android
https://collaction.org
GNU General Public License v3.0
33 stars 12 forks source link

fix(profile): change on logout #300

Closed wizlif closed 2 years ago

wizlif commented 2 years ago

The AuthBloc & ProfileBloc were being recreated (Since they are not singletons) whenever the auth screen was accessed, yet we already had them created in the app screen.

This was causing the profile screen to have a different ProfileBloc from the AuthScreen hence either the profile image wasn't updated when you signed in from a crowdaction or attempted to logout.

Closes #262

https://user-images.githubusercontent.com/15793624/197702145-958bfc24-6558-46e1-b30b-65624c41c260.mp4

Xazin commented 2 years ago

Seems there are some errors, see the analyzer

codecov[bot] commented 2 years ago

Codecov Report

Merging #300 (9d00ac3) into development (cf66d7b) will increase coverage by 0.18%. The diff coverage is 10.20%.

@@              Coverage Diff               @@
##           development    #300      +/-   ##
==============================================
+ Coverage         7.75%   7.93%   +0.18%     
==============================================
  Files              143     144       +1     
  Lines             3752    3754       +2     
==============================================
+ Hits               291     298       +7     
+ Misses            3461    3456       -5     
Impacted Files Coverage Δ
lib/presentation/auth/auth_screen.dart 1.96% <0.00%> (+0.14%) :arrow_up:
...on_details/widgets/crowdaction_details_banner.dart 0.00% <0.00%> (ø)
..._participants/crowdaction_participants_screen.dart 0.00% <0.00%> (ø)
...ntation/shared_widgets/micro_crowdaction_card.dart 0.00% <0.00%> (ø)
lib/core/config/network_config.dart 50.00% <50.00%> (ø)
lib/domain/crowdaction/crowdaction.dart 66.66% <100.00%> (+4.16%) :arrow_up:
lib/domain/participation/participation.dart 100.00% <100.00%> (+100.00%) :arrow_up:
lib/domain/profile/user_profile.dart 100.00% <100.00%> (ø)
lib/domain/profile/profile.dart 100.00% <0.00%> (+50.00%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more