diff --git a/src/session/model/room/event/mod.rs b/src/session/model/room/event/mod.rs
index 0fd6bfaa..da506555 100644
--- a/src/session/model/room/event/mod.rs
+++ b/src/session/model/room/event/mod.rs
@@ -1,4 +1,4 @@
-use std::{borrow::Cow, fmt};
+use std::{borrow::Cow, fmt, ops::Deref};
use gtk::{gio, glib, prelude::*, subclass::prelude::*};
use indexmap::IndexMap;
@@ -82,7 +82,15 @@ pub enum MessageState {
#[derive(Clone, Debug, glib::Boxed)]
#[boxed_type(name = "BoxedEventTimelineItem")]
-pub struct BoxedEventTimelineItem(EventTimelineItem);
+pub struct BoxedEventTimelineItem(pub EventTimelineItem);
+
+impl Deref for BoxedEventTimelineItem {
+ type Target = EventTimelineItem;
+
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
/// A user's read receipt.
#[derive(Clone, Debug)]
@@ -92,29 +100,47 @@ pub struct UserReadReceipt {
}
mod imp {
- use std::cell::{Cell, RefCell};
-
- use glib::object::WeakRef;
- use once_cell::sync::Lazy;
+ use std::{
+ cell::{Cell, RefCell},
+ marker::PhantomData,
+ };
use super::*;
- #[derive(Debug)]
+ #[derive(Debug, glib::Properties)]
+ #[properties(wrapper_type = super::Event)]
pub struct Event {
/// The underlying SDK timeline item.
- pub item: RefCell