diff --git a/CHANGELOG.md b/CHANGELOG.md index a21364b..921a6bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.5.6] - 2026-01-07 + +### Changed + +- **Environment user logging** - Now logs API user only once per session instead of on every refresh + ## [1.5.5] - 2026-01-07 ### Fixed diff --git a/lib/features/front_hall/presentation/widgets/dashboard_content.dart b/lib/features/front_hall/presentation/widgets/dashboard_content.dart index d5bb660..6820828 100644 --- a/lib/features/front_hall/presentation/widgets/dashboard_content.dart +++ b/lib/features/front_hall/presentation/widgets/dashboard_content.dart @@ -26,6 +26,13 @@ class _DashboardContentState extends ConsumerState { Timer? _systemStatsTimer; Timer? _environmentTimer; + /// Tracks if we've logged the environment API user (log once per session) + static bool _hasLoggedEnvUser = false; + static String? _envApiUser; + + /// Get the environment API user (available after first load) + static String? get envApiUser => _envApiUser; + @override void initState() { super.initState(); @@ -133,8 +140,12 @@ class _DashboardContentState extends ConsumerState { const SizedBox(height: 8), environmentAsync.when( data: (envData) { - // Debug: log user on first load - debugPrint('Environment API user: ${envData.user}'); + // Store and log user once per session + if (!_hasLoggedEnvUser && envData.user != null) { + _envApiUser = envData.user; + _hasLoggedEnvUser = true; + debugPrint('Environment API user: ${envData.user}'); + } return _EnvironmentSection( envData: envData, onRefresh: () => ref.invalidate(environmentProvider), diff --git a/pubspec.yaml b/pubspec.yaml index bae6d95..6a4e07b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.5.5+1 +version: 1.5.6+1 environment: sdk: ^3.10.4