diff --git a/lib/src/room.dart b/lib/src/room.dart index fe387836..1740b8f4 100644 --- a/lib/src/room.dart +++ b/lib/src/room.dart @@ -1115,8 +1115,7 @@ class Room { /// Creates a timeline from the store. Returns a [Timeline] object. Future getTimeline( - {onTimelineUpdateCallback onUpdate, - onTimelineInsertCallback onInsert}) async { + {void Function() onUpdate, void Function(int insertID) onInsert}) async { await postLoad(); var events; if (client.database != null) { diff --git a/lib/src/timeline.dart b/lib/src/timeline.dart index cb31bd58..0424fa73 100644 --- a/lib/src/timeline.dart +++ b/lib/src/timeline.dart @@ -24,9 +24,6 @@ import 'room.dart'; import 'utils/event_update.dart'; import 'utils/room_update.dart'; -typedef onTimelineUpdateCallback = void Function(); -typedef onTimelineInsertCallback = void Function(int insertID); - /// Represents the timeline of a room. The callback [onUpdate] will be triggered /// automatically. The initial /// event list will be retreived when created by the `room.getTimeline()` method. @@ -37,8 +34,8 @@ class Timeline { /// Map of event ID to map of type to set of aggregated events final Map>> aggregatedEvents = {}; - final onTimelineUpdateCallback onUpdate; - final onTimelineInsertCallback onInsert; + final void Function() onUpdate; + final void Function(int insertID) onInsert; StreamSubscription sub; StreamSubscription roomSub;