add CompositeType::Repost

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2025-09-04 15:34:33 -04:00
parent 7caf77aa1c
commit ae1d5ab1c5
2 changed files with 4 additions and 1 deletions

View File

@@ -247,6 +247,7 @@ pub struct CompositeKey {
#[derive(Hash, PartialEq, Eq, Debug)] #[derive(Hash, PartialEq, Eq, Debug)]
pub enum CompositeType { pub enum CompositeType {
Reaction, Reaction,
Repost,
} }
#[derive(Hash, PartialEq, Eq, Debug)] #[derive(Hash, PartialEq, Eq, Debug)]

View File

@@ -6,7 +6,7 @@ use nostrdb::{ProfileRecord, Transaction};
use notedeck::name::get_display_name; use notedeck::name::get_display_name;
use notedeck::ui::is_narrow; use notedeck::ui::is_narrow;
use notedeck::{tr_plural, JobsCache, Muted, NoteRef}; use notedeck::{tr_plural, JobsCache, Muted, NoteRef};
use notedeck_ui::app_images::like_image; use notedeck_ui::app_images::{like_image, repost_image};
use notedeck_ui::ProfilePic; use notedeck_ui::ProfilePic;
use std::f32::consts::PI; use std::f32::consts::PI;
use tracing::{error, warn}; use tracing::{error, warn};
@@ -474,6 +474,7 @@ impl CompositeType {
fn image(&self, darkmode: bool) -> egui::Image<'static> { fn image(&self, darkmode: bool) -> egui::Image<'static> {
match self { match self {
CompositeType::Reaction => like_image(), CompositeType::Reaction => like_image(),
CompositeType::Repost => repost_image(darkmode),
} }
} }
@@ -490,6 +491,7 @@ impl CompositeType {
CompositeType::Reaction => { CompositeType::Reaction => {
reaction_description(loc, first_name, count, referenced_type) reaction_description(loc, first_name, count, referenced_type)
} }
CompositeType::Repost => repost_description(loc, first_name, count, referenced_type),
} }
} }
} }