iOS client for Grain grain.social
ios photography atproto
7
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: resolve handle to DID when navigating to profiles from mentions

Mentions in descriptions pass handles instead of DIDs. ProfileView now
uses the resolved DID from the API response for auth comparisons and
follower/following loads, fixing missing data on mention-navigated profiles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+8 -5
+8 -5
Grain/Views/Profile/ProfileView.swift
··· 19 19 @State private var zoomState = ImageZoomState() 20 20 @State private var cardStoryAuthor: GrainStoryAuthor? 21 21 let client: XRPCClient 22 - let did: String 22 + let actor: String 23 23 var isRoot = false 24 24 25 + /// Resolved DID from the loaded profile, or the original actor identifier 26 + private var did: String { viewModel.profile?.did ?? actor } 27 + 25 28 init(client: XRPCClient, did: String, isRoot: Bool = false) { 26 29 self.client = client 27 30 _viewModel = State(initialValue: ProfileDetailViewModel(client: client)) 28 - self.did = did 31 + self.actor = did 29 32 self.isRoot = isRoot 30 33 } 31 34 ··· 197 200 ToolbarItem(placement: .topBarTrailing) { 198 201 NavigationLink { 199 202 SettingsView(client: client, onProfileEdited: { 200 - Task { await viewModel.load(did: did, viewer: auth.userDID, auth: auth.authContext()) } 203 + Task { await viewModel.load(did: actor, viewer: auth.userDID, auth: auth.authContext()) } 201 204 }) 202 205 } label: { 203 206 Image(systemName: "gearshape") ··· 254 257 } 255 258 .background(Color(.systemBackground)) 256 259 .refreshable { 257 - await viewModel.load(did: did, viewer: auth.userDID, auth: auth.authContext()) 260 + await viewModel.load(did: actor, viewer: auth.userDID, auth: auth.authContext()) 258 261 } 259 262 .task { 260 - await viewModel.load(did: did, viewer: auth.userDID, auth: auth.authContext()) 263 + await viewModel.load(did: actor, viewer: auth.userDID, auth: auth.authContext()) 261 264 } 262 265 .onChange(of: deletedGalleryUri) { _, uri in 263 266 if let uri {