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: show time and location in pending face before transition completes

The pending author face now renders the story timestamp and location
chip in the header so they're visible throughout the swipe animation
rather than popping in after the transition commits.

+30 -5
+30 -5
Grain/Views/Stories/StoryViewer.swift
··· 215 215 } 216 216 .padding(.horizontal) 217 217 .padding(.top, 8) 218 - HStack(spacing: 8) { 218 + HStack(alignment: .center, spacing: 8) { 219 219 AvatarView(url: authors[authorIdx].profile.avatar, size: 32) 220 - Text(authors[authorIdx].profile.displayName ?? authors[authorIdx].profile.handle) 221 - .font(.subheadline.bold()) 222 - .foregroundStyle(.white) 220 + VStack(alignment: .leading, spacing: 0) { 221 + Text(story?.creator.displayName ?? story?.creator.handle ?? authors[authorIdx].profile.displayName ?? authors[authorIdx].profile.handle) 222 + .font(.subheadline.bold()) 223 + .foregroundStyle(.white) 224 + if let story { 225 + Text(relativeTime(story.createdAt)) 226 + .font(.caption2) 227 + .foregroundStyle(.white.opacity(0.7)) 228 + } 229 + } 223 230 Spacer() 224 231 } 225 232 .padding(.horizontal, 16) 226 233 .padding(.vertical, 8) 227 - Spacer() 234 + 235 + Spacer().allowsHitTesting(false) 236 + 237 + if let story, let locationText = storyLocationText(story) { 238 + HStack { 239 + HStack(spacing: 4) { 240 + Image(systemName: "location.fill") 241 + Text(locationText) 242 + } 243 + .font(.caption) 244 + .foregroundStyle(.white) 245 + .padding(.horizontal, 12) 246 + .padding(.vertical, 6) 247 + .background(.ultraThinMaterial, in: Capsule()) 248 + Spacer() 249 + } 250 + .padding(.horizontal) 251 + .padding(.bottom, 32) 252 + } 228 253 } 229 254 } 230 255 }