mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-19 09:34:19 +01:00
columns/nav: ocd nevernest
no behavior changed Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -668,7 +668,11 @@ fn render_nav_body(
|
|||||||
}
|
}
|
||||||
Route::EditProfile(pubkey) => {
|
Route::EditProfile(pubkey) => {
|
||||||
let mut action = None;
|
let mut action = None;
|
||||||
if let Some(kp) = ctx.accounts.get_full(pubkey) {
|
let Some(kp) = ctx.accounts.get_full(pubkey) else {
|
||||||
|
error!("Pubkey in EditProfile route did not have an nsec attached in Accounts");
|
||||||
|
return None;
|
||||||
|
};
|
||||||
|
|
||||||
let state = app
|
let state = app
|
||||||
.view_state
|
.view_state
|
||||||
.pubkey_to_profile_state
|
.pubkey_to_profile_state
|
||||||
@@ -690,18 +694,16 @@ fn render_nav_body(
|
|||||||
ProfileState::default()
|
ProfileState::default()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if EditProfileView::new(state, ctx.img_cache).ui(ui) {
|
if EditProfileView::new(state, ctx.img_cache).ui(ui) {
|
||||||
if let Some(taken_state) =
|
if let Some(taken_state) = app.view_state.pubkey_to_profile_state.remove(kp.pubkey)
|
||||||
app.view_state.pubkey_to_profile_state.remove(kp.pubkey)
|
|
||||||
{
|
{
|
||||||
action = Some(RenderNavAction::ProfileAction(ProfileAction::SaveChanges(
|
action = Some(RenderNavAction::ProfileAction(ProfileAction::SaveChanges(
|
||||||
SaveProfileChanges::new(kp.to_full(), taken_state),
|
SaveProfileChanges::new(kp.to_full(), taken_state),
|
||||||
)))
|
)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
error!("Pubkey in EditProfile route did not have an nsec attached in Accounts");
|
|
||||||
}
|
|
||||||
action
|
action
|
||||||
}
|
}
|
||||||
Route::Wallet(wallet_type) => {
|
Route::Wallet(wallet_type) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user