Skip to content

Commit

Permalink
GS-10014 Fix missing user id on login (#2254)
Browse files Browse the repository at this point in the history
Co-authored-by: Paul Pasc <[email protected]>
  • Loading branch information
2 people authored and github-actions[bot] committed Aug 15, 2023
1 parent d016f01 commit 13c7b36
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/features/app_init/app_init_presenter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class AppInitPresenter extends Cubit<AppInitViewModel> with SubscriptionsMixin {
Future<void> _onAppInitSuccess() async {
if (_model.isUserLoggedIn) {
await _navigateBasedOnUserAgreement();
setAmplitudeEventUseCase.execute(_userStore.privateProfile.user);
} else {
await navigator.openOnboarding(const OnboardingInitialParams());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ void main() {
() async {
fakeAsync((async) {
// GIVEN
when(() => Mocks.userStore.privateProfile).thenAnswer((_) => const PrivateProfile.empty());
when(() => AmplitudeMocks.setAmplitudeUserUseCase.execute(any())).thenAnswer((_) => unit);
when(() => AppInitMocks.appInitUseCase.execute()).thenAnswer((_) => successFuture(unit));
when(
() => navigator.openUserAgreementBottomSheet(
Expand Down

0 comments on commit 13c7b36

Please sign in to comment.