Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ The package is available from

## 1.1 Consolidate Android Login

+ Check for locked keyring on Linux [1.0.13 20260626 amoghhosamane]
+ Sync profile visibility state across sessions and browser refreshes #301 [1.0.14 20260626 amogh]
+ Fix unhandled keyring lock exceptions in login and auto-login #350 [1.0.13 20260626 amogh]
+ Show animation while obtaining key [1.0.12 20260626 anushkavidanage]
+ REGISTER popup. Change PASSWD from profile [1.0.11 20260623 tonypioneer]
+ Add account and change password dialogs (CSS v7+) [1.0.10 20260617 anushkavidanage]
Expand Down
29 changes: 27 additions & 2 deletions lib/src/services/solid_profile_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,21 @@ class SolidProfileService {

// Load.

/// Loads profile data from the POD into [solidProfileNotifier].

Future<void> loadProfile() async {
if (!await isUserLoggedIn()) return;

solidProfileNotifier.isLoading = true;

try {
await ensureProfileFolder();

// Check the actual encryption status on the POD to sync multi-session state
final detectedPrivacy = await _detectPrivacyFromPod();
if (detectedPrivacy != null) {
solidProfileNotifier.setPrivacy(detectedPrivacy);
await _persistPrivacyPreference(detectedPrivacy);
}

await Future.wait([_loadAvatar(), _loadDisplayName()]);
} catch (e) {
debugPrint('SolidProfileService.loadProfile: $e');
Expand Down Expand Up @@ -321,6 +327,25 @@ class SolidProfileService {
}
}

Future<SolidProfilePrivacy?> _detectPrivacyFromPod() async {
try {
final displayNameUrl = await _displayNameUrl();
if (await checkResourceStatus(displayNameUrl) == ResourceStatus.exist) {
final encrypted = await isFileEncrypted(displayNameUrl, pathType: PathType.absoluteUrl);
return encrypted ? SolidProfilePrivacy.private : SolidProfilePrivacy.public;
}

final avatarUrl = await _avatarUrl();
if (await checkResourceStatus(avatarUrl) == ResourceStatus.exist) {
final encrypted = await isFileEncrypted(avatarUrl, pathType: PathType.absoluteUrl);
return encrypted ? SolidProfilePrivacy.private : SolidProfilePrivacy.public;
}
} catch (e) {
debugPrint('SolidProfileService._detectPrivacyFromPod: $e');
}
return null;
}

// Build the linked-data turtle for the display name. The user's WebID is
// used as the subject so the triple is meaningful when read independently
// by other agents and queries. We emit both `foaf:name` (the most widely
Expand Down
Loading