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: follow button not updating when viewer state is nil

When profile.viewer was nil (never-interacted-with users), the optional
chain silently skipped the optimistic UI update. Now creates a fresh
ActorViewerState before setting the pending follow.

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

+3
+3
Grain/ViewModels/ProfileDetailViewModel.swift
··· 279 279 } else { 280 280 // Optimistic follow — preserve existing block/mute state 281 281 UIImpactFeedbackGenerator(style: .medium).impactOccurred() 282 + if profile?.viewer == nil { 283 + profile?.viewer = ActorViewerState() 284 + } 282 285 profile?.viewer?.following = "pending" 283 286 profile?.followersCount = (prevCount ?? 0) + 1 284 287