mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-19 19:46:50 +00:00
cleanup
This commit is contained in:
parent
2c9801b9f1
commit
359670cf99
@ -3,7 +3,9 @@ use crate::comms::BusMessage;
|
|||||||
use crate::globals::{Globals, GLOBALS};
|
use crate::globals::{Globals, GLOBALS};
|
||||||
use crate::ui::widgets::{CopyButton, ReplyButton};
|
use crate::ui::widgets::{CopyButton, ReplyButton};
|
||||||
use eframe::egui;
|
use eframe::egui;
|
||||||
use egui::{Align, Color32, Context, Frame, Layout, RichText, ScrollArea, TextEdit, TextStyle, Ui, Vec2};
|
use egui::{
|
||||||
|
Align, Color32, Context, Frame, Layout, RichText, ScrollArea, TextEdit, TextStyle, Ui, Vec2,
|
||||||
|
};
|
||||||
use nostr_types::{EventKind, Id};
|
use nostr_types::{EventKind, Id};
|
||||||
|
|
||||||
pub(super) fn update(app: &mut GossipUi, ctx: &Context, frame: &mut eframe::Frame, ui: &mut Ui) {
|
pub(super) fn update(app: &mut GossipUi, ctx: &Context, frame: &mut eframe::Frame, ui: &mut Ui) {
|
||||||
@ -116,21 +118,23 @@ pub(super) fn update(app: &mut GossipUi, ctx: &Context, frame: &mut eframe::Fram
|
|||||||
ui.separator();
|
ui.separator();
|
||||||
|
|
||||||
ScrollArea::vertical().show(ui, |ui| {
|
ScrollArea::vertical().show(ui, |ui| {
|
||||||
|
let bgcolor = if ctx.style().visuals.dark_mode {
|
||||||
|
Color32::BLACK
|
||||||
|
} else {
|
||||||
|
Color32::WHITE
|
||||||
|
};
|
||||||
|
Frame::none().fill(bgcolor).show(ui, |ui| {
|
||||||
|
for id in feed.iter() {
|
||||||
|
// Stop rendering at the bottom of the window:
|
||||||
|
// (This confuses the scrollbar a bit, so I'm taking it out for now)
|
||||||
|
//let pos2 = ui.next_widget_position();
|
||||||
|
//if pos2.y > screen_rect.max.y {
|
||||||
|
// break;
|
||||||
|
//}
|
||||||
|
|
||||||
let bgcolor = if ctx.style().visuals.dark_mode { Color32::BLACK } else { Color32::WHITE };
|
render_post(app, ctx, frame, ui, *id, 0, false);
|
||||||
Frame::none().fill(bgcolor)
|
}
|
||||||
.show(ui, |ui| {
|
});
|
||||||
for id in feed.iter() {
|
|
||||||
// Stop rendering at the bottom of the window:
|
|
||||||
// (This confuses the scrollbar a bit, so I'm taking it out for now)
|
|
||||||
//let pos2 = ui.next_widget_position();
|
|
||||||
//if pos2.y > screen_rect.max.y {
|
|
||||||
// break;
|
|
||||||
//}
|
|
||||||
|
|
||||||
render_post(app, ctx, frame, ui, *id, 0, false);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user