Pfp integration to side panel

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2024-05-26 22:05:45 -04:00
committed by William Casarin
parent 7ebd694f11
commit df0377cb89
5 changed files with 109 additions and 30 deletions

View File

@@ -126,7 +126,7 @@ impl<'a> DesktopGlobalPopup<'a> {
mod preview {
use crate::{
test_data,
ui::{DesktopSidePanel, Preview, View},
ui::{profile::SimpleProfilePreviewController, DesktopSidePanel, Preview, View},
Damus,
};
@@ -157,7 +157,10 @@ mod preview {
impl View for GlobalPopupPreview {
fn ui(&mut self, ui: &mut egui::Ui) {
let mut panel = DesktopSidePanel::new();
let mut panel = DesktopSidePanel::new(
&mut self.app.account_manager,
SimpleProfilePreviewController::new(&self.app.ndb, &mut self.app.img_cache),
);
DesktopSidePanel::panel().show(ui.ctx(), |ui| panel.ui(ui));
DesktopGlobalPopup::new(&mut self.app).ui(ui);
}