fix(profile): split always
This commit is contained in:
@@ -12,8 +12,8 @@ use crate::{
|
|||||||
ui::timeline::{tabs_ui, TimelineTabView},
|
ui::timeline::{tabs_ui, TimelineTabView},
|
||||||
};
|
};
|
||||||
use notedeck::{
|
use notedeck::{
|
||||||
name::get_display_name, profile::get_profile_url, ui::is_narrow, Accounts, IsFollowing,
|
name::get_display_name, profile::get_profile_url, Accounts, IsFollowing, MuteFun, NoteAction,
|
||||||
MuteFun, NoteAction, NoteContext, NotedeckTextStyle,
|
NoteContext, NotedeckTextStyle,
|
||||||
};
|
};
|
||||||
use notedeck_ui::{
|
use notedeck_ui::{
|
||||||
app_images,
|
app_images,
|
||||||
@@ -246,7 +246,7 @@ impl<'a, 'd> ProfileView<'a, 'd> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if let Some(lud16) = lud16 {
|
if let Some(lud16) = lud16 {
|
||||||
if is_narrow(ui.ctx()) && website_url.is_some() {
|
if website_url.is_some() {
|
||||||
ui.end_row();
|
ui.end_row();
|
||||||
}
|
}
|
||||||
ui.horizontal(|ui| {
|
ui.horizontal(|ui| {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ pub use picture::ProfilePic;
|
|||||||
pub use preview::ProfilePreview;
|
pub use preview::ProfilePreview;
|
||||||
|
|
||||||
use egui::{load::TexturePoll, Label, RichText};
|
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};
|
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();
|
ui.end_row();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,12 +74,7 @@ pub fn display_name_widget<'a>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn about_section_widget<'a, 'b>(
|
pub fn about_section_widget<'a>(profile: Option<&'a ProfileRecord<'a>>) -> impl egui::Widget + 'a {
|
||||||
profile: Option<&'b ProfileRecord<'a>>,
|
|
||||||
) -> impl egui::Widget + 'b
|
|
||||||
where
|
|
||||||
'b: 'a,
|
|
||||||
{
|
|
||||||
move |ui: &mut egui::Ui| {
|
move |ui: &mut egui::Ui| {
|
||||||
if let Some(about) = profile
|
if let Some(about) = profile
|
||||||
.map(|p| p.record().profile())
|
.map(|p| p.record().profile())
|
||||||
|
|||||||
Reference in New Issue
Block a user