@@ -13,7 +13,7 @@ use matrix_sdk::{
13
13
RoomHero as SdkRoomHero , RoomMemberships , RoomState ,
14
14
} ;
15
15
use matrix_sdk_ui:: {
16
- timeline:: { default_event_filter, RoomExt , TimelineBuilder } ,
16
+ timeline:: { default_event_filter, TimelineBuilder } ,
17
17
unable_to_decrypt_hook:: UtdHookManager ,
18
18
} ;
19
19
use mime:: Mime ;
@@ -31,7 +31,6 @@ use ruma::{
31
31
} ,
32
32
EventId , Int , OwnedDeviceId , OwnedUserId , RoomAliasId , UserId ,
33
33
} ;
34
- use tokio:: sync:: RwLock ;
35
34
use tracing:: { error, warn} ;
36
35
37
36
use crate :: {
@@ -73,18 +72,15 @@ impl From<RoomState> for Membership {
73
72
}
74
73
}
75
74
76
- pub ( crate ) type TimelineLock = Arc < RwLock < Option < Arc < Timeline > > > > ;
77
-
78
75
#[ derive( uniffi:: Object ) ]
79
76
pub struct Room {
80
77
pub ( super ) inner : SdkRoom ,
81
78
utd_hook_manager : Option < Arc < UtdHookManager > > ,
82
- timeline : TimelineLock ,
83
79
}
84
80
85
81
impl Room {
86
82
pub ( crate ) fn new ( inner : SdkRoom , utd_hook_manager : Option < Arc < UtdHookManager > > ) -> Self {
87
- Room { inner, timeline : Default :: default ( ) , utd_hook_manager }
83
+ Room { inner, utd_hook_manager }
88
84
}
89
85
}
90
86
@@ -173,17 +169,6 @@ impl Room {
173
169
Ok ( ( ) )
174
170
}
175
171
176
- pub async fn timeline ( & self ) -> Result < Arc < Timeline > , ClientError > {
177
- let mut write_guard = self . timeline . write ( ) . await ;
178
- if let Some ( timeline) = & * write_guard {
179
- Ok ( timeline. clone ( ) )
180
- } else {
181
- let timeline = Timeline :: new ( self . inner . timeline ( ) . await ?) ;
182
- * write_guard = Some ( timeline. clone ( ) ) ;
183
- Ok ( timeline)
184
- }
185
- }
186
-
187
172
/// Build a new timeline instance with the given configuration.
188
173
pub async fn timeline_with_configuration (
189
174
& self ,
0 commit comments