From 9eadcd7ea0527741f91afb92075376bf07aa4277 Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Mon, 11 Nov 2024 14:01:59 -0300 Subject: [PATCH] fix misc --- .../local_profile_component_model.dart | 1 - .../local_profile_component_widget.dart | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/components/organism_components/local_profile_component/local_profile_component_model.dart b/lib/components/organism_components/local_profile_component/local_profile_component_model.dart index bf90645a..aec1deda 100644 --- a/lib/components/organism_components/local_profile_component/local_profile_component_model.dart +++ b/lib/components/organism_components/local_profile_component/local_profile_component_model.dart @@ -20,7 +20,6 @@ class LocalProfileComponentModel extends FlutterFlowModel getData() async { cliName = (await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? ''; cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? ''; - ; setStateCallback?.call(); } diff --git a/lib/components/organism_components/local_profile_component/local_profile_component_widget.dart b/lib/components/organism_components/local_profile_component/local_profile_component_widget.dart index 6c39fa79..28ef3f08 100644 --- a/lib/components/organism_components/local_profile_component/local_profile_component_widget.dart +++ b/lib/components/organism_components/local_profile_component/local_profile_component_widget.dart @@ -38,12 +38,12 @@ class _LocalProfileComponentWidgetState extends State safeSetState(() {}); WidgetsBinding.instance.addPostFrameCallback((_) async{ - final String? cliUUID = await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage); bool initialized = false; - if(cliUUID == null || cliUUID.isEmpty && !initialized) + bool isDevLinked = _model.cliUUID.isNotEmpty; + if(!isDevLinked && !initialized) { initialized = true; await LocalizationService.processLocals(context).then((value) => value == true ? onUpdate() : null); - + } }); }