MIH Auth Offline First Change

This commit is contained in:
yaso 2026-07-08 13:08:03 +02:00
parent a5bdee892c
commit 9d30face3d
13 changed files with 425 additions and 55 deletions

View file

@ -48,7 +48,6 @@ class MzansiProfileProvider extends ChangeNotifier {
business = _hiveData.getCachedBusiness();
businessUser = _hiveData.getCachedBusinessUser();
if (user != null && user!.pro_pic_path.isNotEmpty) {
KenLogger.success("proPicPath: ${user!.pro_pic_path}| THis is it");
userProfilePicUrl = MihFileApi.getMinioFileUrlV2(user!.pro_pic_path);
userProfilePicture = CachedNetworkImageProvider(userProfilePicUrl!);
}
@ -85,10 +84,14 @@ class MzansiProfileProvider extends ChangeNotifier {
refreshIndicatorKey.currentState?.show();
}
bool isLocalModificationsPending(){
bool isLocalModificationsPending() {
return _hiveData.isModificationsNotEmpty();
}
bool hasLocalProfile() {
return _hiveData.hasCachedProfile();
}
Future<bool> addUserConsent(UserConsent newConsent) async {
bool success = await _hiveData.addUserConsentLocally(newConsent);
await _hiveData.queuAddConsentModification(newConsent);