Skip to content

Commit 2468690

Browse files
committed
Add missing docstrings
1 parent ee39d6c commit 2468690

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/models/event-timeline-set.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export interface IAddLiveEventOptions {
7777
}
7878

7979
export interface IAddEventToTimelineOptions {
80+
/** Whether to insert the new event at the start of the timeline */
8081
toStartOfTimeline: boolean;
8182
/** Whether the sync response came from cache */
8283
fromCache?: boolean;

src/models/event-timeline.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ export interface IAddEventOptions {
3838
toStartOfTimeline: boolean;
3939
/** The state events to reconcile metadata from */
4040
roomState?: RoomState;
41-
/** TODO */
41+
/** Whether the timeline was empty before the marker arrived in
42+
* the room. This could be happen in a variety of cases:
43+
* 1. From the initial sync
44+
* 2. It's the first state we're seeing after joining the room
45+
* 3. Or whether it's coming from `syncFromCache` */
4246
timelineWasEmpty?: boolean;
4347
}
4448

@@ -364,7 +368,7 @@ export class EventTimeline {
364368
}
365369

366370
/**
367-
* Add a new event to the timeline, and update the state
371+
* Add a new event to the timeline, and update the state
368372
*
369373
* @param {MatrixEvent} event new event
370374
* @param {IAddEventOptions} options addEvent options

0 commit comments

Comments
 (0)