mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-19 09:34:19 +01:00
columns: clean up flags, refactor content rendering
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -10,7 +10,7 @@ use crate::{
|
||||
PulseAlpha, Username,
|
||||
};
|
||||
|
||||
pub use contents::{render_note_contents, render_note_preview, NoteContents};
|
||||
pub use contents::{render_note_preview, NoteContents};
|
||||
pub use context::NoteContextButton;
|
||||
use notedeck::get_current_wallet;
|
||||
use notedeck::note::ZapTargetAmount;
|
||||
@@ -366,11 +366,11 @@ impl<'a, 'd> NoteView<'a, 'd> {
|
||||
flags: NoteOptions,
|
||||
) {
|
||||
let horiz_resp = ui
|
||||
.horizontal(|ui| {
|
||||
.horizontal_wrapped(|ui| {
|
||||
ui.spacing_mut().item_spacing.x = if is_narrow(ui.ctx()) { 1.0 } else { 2.0 };
|
||||
let response = ui
|
||||
.add(Username::new(i18n, profile.as_ref().ok(), note.pubkey()).abbreviated(20));
|
||||
if !flags.contains(NoteOptions::ShowCreatedAtBottom) {
|
||||
if !flags.contains(NoteOptions::FullCreatedDate) {
|
||||
return render_notetime(ui, i18n, note.created_at(), true).response;
|
||||
}
|
||||
response
|
||||
@@ -508,8 +508,6 @@ impl<'a, 'd> NoteView<'a, 'd> {
|
||||
let pfp_rect = pfp_resp.bounding_rect;
|
||||
let mut note_action: Option<NoteAction> = pfp_resp.into_action(self.note.pubkey());
|
||||
|
||||
self.flags.set(NoteOptions::ShowCreatedAtBottom, false);
|
||||
|
||||
ui.with_layout(egui::Layout::top_down(egui::Align::LEFT), |ui| {
|
||||
NoteView::note_header(
|
||||
ui,
|
||||
|
||||
Reference in New Issue
Block a user