ui: use proper response in wide-rendered note
This was causing hitbox issues Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -451,9 +451,11 @@ impl<'a> NoteView<'a> {
|
||||
|
||||
// wide design
|
||||
let response = if self.options().has_wide() {
|
||||
ui.vertical(|ui| {
|
||||
ui.horizontal(|ui| {
|
||||
if self.pfp(note_key, &profile, ui).clicked() {
|
||||
note_action = Some(NoteAction::OpenProfile(Pubkey::new(*self.note.pubkey())));
|
||||
note_action =
|
||||
Some(NoteAction::OpenProfile(Pubkey::new(*self.note.pubkey())));
|
||||
};
|
||||
|
||||
let size = ui.available_size();
|
||||
@@ -496,19 +498,21 @@ impl<'a> NoteView<'a> {
|
||||
note_key,
|
||||
self.options(),
|
||||
);
|
||||
let resp = ui.add(&mut contents);
|
||||
|
||||
ui.add(&mut contents);
|
||||
|
||||
if let Some(action) = contents.action() {
|
||||
note_action = Some(*action);
|
||||
}
|
||||
|
||||
if self.options().has_actionbar() {
|
||||
if let Some(action) = render_note_actionbar(ui, self.note.id(), note_key).inner {
|
||||
if let Some(action) = render_note_actionbar(ui, self.note.id(), note_key).inner
|
||||
{
|
||||
note_action = Some(action);
|
||||
}
|
||||
}
|
||||
|
||||
resp
|
||||
})
|
||||
.response
|
||||
} else {
|
||||
// main design
|
||||
ui.with_layout(egui::Layout::left_to_right(egui::Align::TOP), |ui| {
|
||||
|
||||
Reference in New Issue
Block a user