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(
|
Route::Profile(pubkey) => render_profile_route(
|
||||||
*pubkey,
|
pubkey,
|
||||||
&app.ndb,
|
&app.ndb,
|
||||||
&mut app.columns,
|
&mut app.columns,
|
||||||
&mut app.profiles,
|
&mut app.profiles,
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ pub fn render_timeline_route(
|
|||||||
|
|
||||||
#[allow(clippy::too_many_arguments)]
|
#[allow(clippy::too_many_arguments)]
|
||||||
pub fn render_profile_route(
|
pub fn render_profile_route(
|
||||||
pubkey: Pubkey,
|
pubkey: &Pubkey,
|
||||||
ndb: &Ndb,
|
ndb: &Ndb,
|
||||||
columns: &mut Columns,
|
columns: &mut Columns,
|
||||||
profiles: &mut NotesHolderStorage<Profile>,
|
profiles: &mut NotesHolderStorage<Profile>,
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ use crate::{
|
|||||||
use super::timeline::{tabs_ui, TimelineTabView};
|
use super::timeline::{tabs_ui, TimelineTabView};
|
||||||
|
|
||||||
pub struct ProfileView<'a> {
|
pub struct ProfileView<'a> {
|
||||||
pubkey: Pubkey,
|
pubkey: &'a Pubkey,
|
||||||
col_id: usize,
|
col_id: usize,
|
||||||
profiles: &'a mut NotesHolderStorage<Profile>,
|
profiles: &'a mut NotesHolderStorage<Profile>,
|
||||||
ndb: &'a Ndb,
|
ndb: &'a Ndb,
|
||||||
@@ -25,7 +25,7 @@ pub struct ProfileView<'a> {
|
|||||||
|
|
||||||
impl<'a> ProfileView<'a> {
|
impl<'a> ProfileView<'a> {
|
||||||
pub fn new(
|
pub fn new(
|
||||||
pubkey: Pubkey,
|
pubkey: &'a Pubkey,
|
||||||
col_id: usize,
|
col_id: usize,
|
||||||
profiles: &'a mut NotesHolderStorage<Profile>,
|
profiles: &'a mut NotesHolderStorage<Profile>,
|
||||||
ndb: &'a Ndb,
|
ndb: &'a Ndb,
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
actionbar::TimelineResponse, imgcache::ImageCache, notecache::NoteCache,
|
actionbar::TimelineResponse,
|
||||||
notes_holder::{NotesHolder, NotesHolderStorage}, thread::Thread,
|
imgcache::ImageCache,
|
||||||
|
notecache::NoteCache,
|
||||||
|
notes_holder::{NotesHolder, NotesHolderStorage},
|
||||||
|
thread::Thread,
|
||||||
};
|
};
|
||||||
use nostrdb::{Ndb, NoteKey, Transaction};
|
use nostrdb::{Ndb, NoteKey, Transaction};
|
||||||
use tracing::error;
|
use tracing::error;
|
||||||
|
|||||||
Reference in New Issue
Block a user