Fix own profile not updating after save + expand roadmap

- ProfileView: own profile now reads from user store directly instead of
  useProfile() hook, which only re-fetches on pubkey change — so the bio/
  name/avatar updates immediately after saving without needing to navigate away

- ROADMAP: added items from playtest feedback:
  - About/funding page (Bitcoin QR, Lightning, zap dev npub, Ko-fi/GitHub)
  - Mute/ignore user + anti-spam settings + WOT brainstorm note
  - Quote/repost (NIP-18)
  - Sidebar auto-hide + clearer collapse affordance
  - Profile helpers for newcomers (NIP-05, image upload)
  - Search improvements (NIP-50 relay detection, people search fallback)
  - UI/look & feel deferred until after Windows playtest
  - Long-form reading experience as a brainstorm session

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jure
2026-03-09 20:41:19 +01:00
parent 515eb2c81c
commit 2cdf99b725
2 changed files with 75 additions and 26 deletions

View File

@@ -100,11 +100,15 @@ function EditProfileForm({ pubkey, onSaved }: { pubkey: string; onSaved: () => v
export function ProfileView() {
const { selectedPubkey, goBack } = useUIStore();
const { pubkey: ownPubkey, loggedIn, follows, follow, unfollow } = useUserStore();
const { pubkey: ownPubkey, profile: ownProfile, loggedIn, follows, follow, unfollow } = useUserStore();
const pubkey = selectedPubkey!;
const isOwn = pubkey === ownPubkey;
const profile = useProfile(pubkey);
// For own profile, use the user store directly — it's updated immediately
// after save. useProfile() only re-fetches when pubkey changes, so it would
// show stale data until the user navigates away and back.
const fetchedProfile = useProfile(pubkey);
const profile = isOwn ? ownProfile : fetchedProfile;
const [notes, setNotes] = useState<NDKEvent[]>([]);
const [loading, setLoading] = useState(true);
const [editing, setEditing] = useState(false);