refactor: Remove types for timeline callbacks
These types weren't that helpful anyway and their names were not compatible with the new linter rule of Flutter 2.2.
This commit is contained in:
parent
73db010db4
commit
ab0ff46900
|
|
@ -1115,8 +1115,7 @@ class Room {
|
||||||
|
|
||||||
/// Creates a timeline from the store. Returns a [Timeline] object.
|
/// Creates a timeline from the store. Returns a [Timeline] object.
|
||||||
Future<Timeline> getTimeline(
|
Future<Timeline> getTimeline(
|
||||||
{onTimelineUpdateCallback onUpdate,
|
{void Function() onUpdate, void Function(int insertID) onInsert}) async {
|
||||||
onTimelineInsertCallback onInsert}) async {
|
|
||||||
await postLoad();
|
await postLoad();
|
||||||
var events;
|
var events;
|
||||||
if (client.database != null) {
|
if (client.database != null) {
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,6 @@ import 'room.dart';
|
||||||
import 'utils/event_update.dart';
|
import 'utils/event_update.dart';
|
||||||
import 'utils/room_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
|
/// Represents the timeline of a room. The callback [onUpdate] will be triggered
|
||||||
/// automatically. The initial
|
/// automatically. The initial
|
||||||
/// event list will be retreived when created by the `room.getTimeline()` method.
|
/// 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
|
/// Map of event ID to map of type to set of aggregated events
|
||||||
final Map<String, Map<String, Set<Event>>> aggregatedEvents = {};
|
final Map<String, Map<String, Set<Event>>> aggregatedEvents = {};
|
||||||
|
|
||||||
final onTimelineUpdateCallback onUpdate;
|
final void Function() onUpdate;
|
||||||
final onTimelineInsertCallback onInsert;
|
final void Function(int insertID) onInsert;
|
||||||
|
|
||||||
StreamSubscription<EventUpdate> sub;
|
StreamSubscription<EventUpdate> sub;
|
||||||
StreamSubscription<RoomUpdate> roomSub;
|
StreamSubscription<RoomUpdate> roomSub;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue