|
|
@ -1,4 +1,5 @@ |
|
|
|
use crate::entities::notification::{Notification, NotificationType}; |
|
|
|
use crate::entities::notification::{Notification, NotificationType}; |
|
|
|
|
|
|
|
use crate::entities::status::Status; |
|
|
|
use std::fmt::{Display, Formatter}; |
|
|
|
use std::fmt::{Display, Formatter}; |
|
|
|
use crate::entities::event::Event; |
|
|
|
use crate::entities::event::Event; |
|
|
|
|
|
|
|
|
|
|
@ -52,8 +53,16 @@ impl<'a> Display for EventDisplay<'a> { |
|
|
|
write!(f, "FiltersChanged") |
|
|
|
write!(f, "FiltersChanged") |
|
|
|
} |
|
|
|
} |
|
|
|
Event::Update(s) => { |
|
|
|
Event::Update(s) => { |
|
|
|
write!(f, "Status {{ #{}, acct: @{}, status: «{}», vis: {:?} }}", s.id, s.account.acct, s.content, s.visibility ) |
|
|
|
StatusDisplay(s).fmt(f) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pub struct StatusDisplay<'a>(pub &'a Status); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
impl<'a> Display for StatusDisplay<'a> { |
|
|
|
|
|
|
|
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { |
|
|
|
|
|
|
|
write!(f, "Status {{ #{}, acct: @{}, status: «{}», vis: {:?} }}", self.0.id, self.0.account.acct, self.0.content, self.0.visibility ) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|