fix(profile): split always

This commit is contained in:
Fernando López Guevara
2025-07-16 11:00:45 -03:00
parent befce76a90
commit 44da10dc88
2 changed files with 6 additions and 11 deletions

View File

@@ -12,8 +12,8 @@ use crate::{
ui::timeline::{tabs_ui, TimelineTabView},
};
use notedeck::{
name::get_display_name, profile::get_profile_url, ui::is_narrow, Accounts, IsFollowing,
MuteFun, NoteAction, NoteContext, NotedeckTextStyle,
name::get_display_name, profile::get_profile_url, Accounts, IsFollowing, MuteFun, NoteAction,
NoteContext, NotedeckTextStyle,
};
use notedeck_ui::{
app_images,
@@ -246,7 +246,7 @@ impl<'a, 'd> ProfileView<'a, 'd> {
}
if let Some(lud16) = lud16 {
if is_narrow(ui.ctx()) && website_url.is_some() {
if website_url.is_some() {
ui.end_row();
}
ui.horizontal(|ui| {

View File

@@ -8,7 +8,7 @@ pub use picture::ProfilePic;
pub use preview::ProfilePreview;
use egui::{load::TexturePoll, Label, RichText};
use notedeck::{ui::is_narrow, IsFollowing, NostrName, NotedeckTextStyle};
use notedeck::{IsFollowing, NostrName, NotedeckTextStyle};
use crate::{app_images, colors, widgets::styled_button_toggleable};
@@ -39,7 +39,7 @@ pub fn display_name_widget<'a>(
)
});
if is_narrow(ui.ctx()) {
if name.username.is_some() && name.nip05.is_some() {
ui.end_row();
}
@@ -74,12 +74,7 @@ pub fn display_name_widget<'a>(
}
}
pub fn about_section_widget<'a, 'b>(
profile: Option<&'b ProfileRecord<'a>>,
) -> impl egui::Widget + 'b
where
'b: 'a,
{
pub fn about_section_widget<'a>(profile: Option<&'a ProfileRecord<'a>>) -> impl egui::Widget + 'a {
move |ui: &mut egui::Ui| {
if let Some(about) = profile
.map(|p| p.record().profile())