columns/profile: only mutate profile state after navigating

The code currently mutates the profile state during nav rendering,
which screws up profile state updates. This syncs ProfileStates
in the ui. before it was getting out of sync.

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2025-07-15 10:15:21 -07:00
parent f2adb949f6
commit 0cc64da1ca
2 changed files with 60 additions and 37 deletions

View File

@@ -1,5 +1,3 @@
use std::collections::HashMap;
use enostr::{FilledKeypair, FullKeypair, ProfileState, Pubkey, RelayPool};
use nostrdb::{Ndb, Note, NoteBuildOptions, NoteBuilder, Transaction};
@@ -45,7 +43,6 @@ pub enum ProfileAction {
impl ProfileAction {
pub fn process_profile_action(
&self,
state_map: &mut HashMap<Pubkey, ProfileState>,
ndb: &Ndb,
pool: &mut RelayPool,
accounts: &Accounts,
@@ -59,7 +56,6 @@ impl ProfileAction {
raw_msg.as_str(),
nostrdb::IngestMetadata::new().client(true),
);
let _ = state_map.remove_entry(&changes.kp.pubkey);
info!("sending {}", raw_msg);
pool.send(&enostr::ClientMessage::raw(raw_msg));