File tree 5 files changed +16
-18
lines changed
crates/matrix-sdk-ui/src/timeline
5 files changed +16
-18
lines changed Original file line number Diff line number Diff line change @@ -33,9 +33,9 @@ as_variant = "1.2.0"
33
33
base64 = " 0.22.1"
34
34
byteorder = " 1.5.0"
35
35
chrono = " 0.4.38"
36
- eyeball = { version = " 0.8.8 " , features = [" tracing" ] }
37
- eyeball-im = { version = " 0.6.0 " , features = [" tracing" ] }
38
- eyeball-im-util = " 0.8.0 "
36
+ eyeball = { path = " ../eyeball/eyeball/ " , features = [" tracing" ] }
37
+ eyeball-im = { path = " ../eyeball/eyeball-im " , features = [" tracing" ] }
38
+ eyeball-im-util = { path = " ../eyeball/eyeball-im-util " }
39
39
futures-core = " 0.3.31"
40
40
futures-executor = " 0.3.21"
41
41
futures-util = " 0.3.31"
@@ -44,7 +44,7 @@ growable-bloom-filter = "2.1.1"
44
44
hkdf = " 0.12.4"
45
45
hmac = " 0.12.1"
46
46
http = " 1.1.0"
47
- imbl = " 4 .0.1 "
47
+ imbl = " 3 .0.0 "
48
48
indexmap = " 2.6.0"
49
49
insta = { version = " 1.41.1" , features = [" json" ] }
50
50
itertools = " 0.13.0"
Original file line number Diff line number Diff line change @@ -496,11 +496,15 @@ impl<P: RoomDataProvider> TimelineController<P> {
496
496
( state. items . clone_items ( ) , state. items . subscribe ( ) . into_stream ( ) )
497
497
}
498
498
499
- pub ( super ) async fn subscribe_batched (
499
+ pub ( super ) async fn subscribe_batched_and_limited (
500
500
& self ,
501
501
) -> ( Vector < Arc < TimelineItem > > , impl Stream < Item = Vec < VectorDiff < Arc < TimelineItem > > > > ) {
502
502
let state = self . state . read ( ) . await ;
503
- state. items . subscribe ( ) . into_values_and_batched_stream ( )
503
+ state
504
+ . items
505
+ . subscribe ( )
506
+ . into_values_and_batched_stream ( )
507
+ . dynamic_skip_with_initial_count ( 0 , state. meta . subscriber_skip_count . subscribe ( ) )
504
508
}
505
509
506
510
pub ( super ) async fn subscribe_filter_map < U , F > (
Original file line number Diff line number Diff line change @@ -276,7 +276,7 @@ impl Timeline {
276
276
pub async fn subscribe (
277
277
& self ,
278
278
) -> ( Vector < Arc < TimelineItem > > , impl Stream < Item = Vec < VectorDiff < Arc < TimelineItem > > > > ) {
279
- let ( items, stream) = self . controller . subscribe_batched ( ) . await ;
279
+ let ( items, stream) = self . controller . subscribe_batched_and_limited ( ) . await ;
280
280
let stream = WithTimelineDropHandle :: new ( stream, self . drop_handle . clone ( ) ) ;
281
281
( items, stream)
282
282
}
Original file line number Diff line number Diff line change @@ -461,7 +461,7 @@ async fn test_replace_with_initial_events_when_batched() {
461
461
)
462
462
. await ;
463
463
464
- let ( items, mut stream) = timeline. controller . subscribe_batched ( ) . await ;
464
+ let ( items, mut stream) = timeline. controller . subscribe_batched_and_limited ( ) . await ;
465
465
assert_eq ! ( items. len( ) , 2 ) ;
466
466
assert ! ( items[ 0 ] . is_date_divider( ) ) ;
467
467
assert_eq ! ( items[ 1 ] . as_event( ) . unwrap( ) . content( ) . as_message( ) . unwrap( ) . body( ) , "hey" ) ;
You can’t perform that action at this time.
0 commit comments