From 553b6763af6c9838ad182d4d0afd9434efcfe53d Mon Sep 17 00:00:00 2001 From: Hugo Pointcheval Date: Sat, 6 May 2023 11:14:04 +0200 Subject: [PATCH 1/3] fix: remove models from pub ignore --- .pubignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.pubignore b/.pubignore index d6a35232..e6ce7445 100644 --- a/.pubignore +++ b/.pubignore @@ -584,7 +584,6 @@ new_version.sh .latest_version .vscode/ example/ -models/ build/ *.iml -- 2.47.2 From 93873e3134f0d4acc58e22f1fa24eae52633462f Mon Sep 17 00:00:00 2001 From: Hugo Pointcheval Date: Sat, 6 May 2023 11:26:40 +0200 Subject: [PATCH 2/3] refactor(authentication): controle cache checking --- .../authentication/cubit/authentication_cubit.dart | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/wyatt_authentication_bloc/lib/src/features/authentication/cubit/authentication_cubit.dart b/packages/wyatt_authentication_bloc/lib/src/features/authentication/cubit/authentication_cubit.dart index e5abf6ec..20b238c5 100644 --- a/packages/wyatt_authentication_bloc/lib/src/features/authentication/cubit/authentication_cubit.dart +++ b/packages/wyatt_authentication_bloc/lib/src/features/authentication/cubit/authentication_cubit.dart @@ -40,6 +40,7 @@ abstract class AuthenticationCubit /// {@macro authentication_cubit} AuthenticationCubit({ required this.authenticationRepository, + this.checkForCachedAccountOnInitialization = true, }) : super(const AuthenticationState.unknown()) { _init(); } @@ -47,6 +48,9 @@ abstract class AuthenticationCubit /// The authentication repository. final AuthenticationRepository authenticationRepository; + /// Automatically check for cached account on initialization. + final bool checkForCachedAccountOnInitialization; + /// The latest session. AuthenticationSession? _latestSession; @@ -56,7 +60,9 @@ abstract class AuthenticationCubit _listenForAuthenticationChanges(); /// Check if there is a cached account. - await authenticationRepository.checkForCachedAccount(); + if (checkForCachedAccountOnInitialization) { + await checkForCachedAccount(); + } } void _listenForAuthenticationChanges() { @@ -148,6 +154,10 @@ abstract class AuthenticationCubit ), ).call(); + /// Checks for cached account. + FutureOr checkForCachedAccount() async => + authenticationRepository.checkForCachedAccount(); + /// Returns latest session. /// /// Contains latest event and latest session data (account + extra data) -- 2.47.2 From 80135a611df7e47e239cf59baef6cef8e8bde815 Mon Sep 17 00:00:00 2001 From: Hugo Pointcheval Date: Sat, 6 May 2023 11:26:54 +0200 Subject: [PATCH 3/3] chore(release): publish packages - wyatt_authentication_bloc@0.5.0+1 --- CHANGELOG.md | 21 +++++++++++++++++++ .../wyatt_authentication_bloc/CHANGELOG.md | 4 ++++ .../wyatt_authentication_bloc/pubspec.yaml | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29944175..a298c3b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,27 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## 2023-05-06 + +### Changes + +--- + +Packages with breaking changes: + + - There are no breaking changes in this release. + +Packages with other changes: + + - [`wyatt_authentication_bloc` - `v0.5.0+1`](#wyatt_authentication_bloc---v0501) + +--- + +#### `wyatt_authentication_bloc` - `v0.5.0+1` + + - **REFACTOR**(authentication): controle cache checking. + + ## 2023-05-04 ### Changes diff --git a/packages/wyatt_authentication_bloc/CHANGELOG.md b/packages/wyatt_authentication_bloc/CHANGELOG.md index 0ea6241f..d86391e5 100644 --- a/packages/wyatt_authentication_bloc/CHANGELOG.md +++ b/packages/wyatt_authentication_bloc/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.5.0+1 + + - **REFACTOR**(authentication): controle cache checking. + ## 0.5.0 > Note: This release has breaking changes. diff --git a/packages/wyatt_authentication_bloc/pubspec.yaml b/packages/wyatt_authentication_bloc/pubspec.yaml index a0bbf297..f2ee8aeb 100644 --- a/packages/wyatt_authentication_bloc/pubspec.yaml +++ b/packages/wyatt_authentication_bloc/pubspec.yaml @@ -1,7 +1,7 @@ name: wyatt_authentication_bloc description: Authentication BLoC for Flutter repository: https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages/src/branch/master/packages/wyatt_authentication_bloc -version: 0.5.0 +version: 0.5.0+1 publish_to: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub -- 2.47.2