mirror of
https://github.com/aljazceru/notedeck.git
synced 2026-01-17 23:34:19 +01:00
fix unnecessary copy every frame
Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
@@ -117,7 +117,7 @@ pub fn render_nav(col: usize, app: &mut Damus, ui: &mut egui::Ui) {
|
||||
}
|
||||
|
||||
Route::Profile(pubkey) => render_profile_route(
|
||||
*pubkey,
|
||||
pubkey,
|
||||
&app.ndb,
|
||||
&mut app.columns,
|
||||
&mut app.profiles,
|
||||
|
||||
@@ -157,7 +157,7 @@ pub fn render_timeline_route(
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn render_profile_route(
|
||||
pubkey: Pubkey,
|
||||
pubkey: &Pubkey,
|
||||
ndb: &Ndb,
|
||||
columns: &mut Columns,
|
||||
profiles: &mut NotesHolderStorage<Profile>,
|
||||
|
||||
@@ -15,7 +15,7 @@ use crate::{
|
||||
use super::timeline::{tabs_ui, TimelineTabView};
|
||||
|
||||
pub struct ProfileView<'a> {
|
||||
pubkey: Pubkey,
|
||||
pubkey: &'a Pubkey,
|
||||
col_id: usize,
|
||||
profiles: &'a mut NotesHolderStorage<Profile>,
|
||||
ndb: &'a Ndb,
|
||||
@@ -25,7 +25,7 @@ pub struct ProfileView<'a> {
|
||||
|
||||
impl<'a> ProfileView<'a> {
|
||||
pub fn new(
|
||||
pubkey: Pubkey,
|
||||
pubkey: &'a Pubkey,
|
||||
col_id: usize,
|
||||
profiles: &'a mut NotesHolderStorage<Profile>,
|
||||
ndb: &'a Ndb,
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
use crate::{
|
||||
actionbar::TimelineResponse, imgcache::ImageCache, notecache::NoteCache,
|
||||
notes_holder::{NotesHolder, NotesHolderStorage}, thread::Thread,
|
||||
actionbar::TimelineResponse,
|
||||
imgcache::ImageCache,
|
||||
notecache::NoteCache,
|
||||
notes_holder::{NotesHolder, NotesHolderStorage},
|
||||
thread::Thread,
|
||||
};
|
||||
use nostrdb::{Ndb, NoteKey, Transaction};
|
||||
use tracing::error;
|
||||
|
||||
Reference in New Issue
Block a user