Remove flutter chat #26
2 changed files with 18 additions and 7 deletions
add a todo for showing events waiting for a response, some wip code
commit
734e7f57df
|
|
@ -113,7 +113,6 @@ class RoomChatController extends AsyncNotifier<IList<Event>> {
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
const ISet.empty(),
|
const ISet.empty(),
|
||||||
addToNewEvents: false,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return response.hasMore;
|
return response.hasMore;
|
||||||
|
|
@ -158,7 +157,23 @@ class RoomChatController extends AsyncNotifier<IList<Event>> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// state = state TODO
|
// TODO: Add new event to timeline whilst its sending
|
||||||
|
// ref
|
||||||
|
// .watch(RoomsController.provider.notifier)
|
||||||
|
// .update(
|
||||||
|
// {
|
||||||
|
// roomId: Room(
|
||||||
|
// events: [event].toIList(),
|
||||||
|
// timeline: [
|
||||||
|
// TimelineRowTuple(
|
||||||
|
// timelineRowId: event.timelineRowId,
|
||||||
|
// eventRowId: event.rowId,
|
||||||
|
// ),
|
||||||
|
// ].toIList(),
|
||||||
|
// ),
|
||||||
|
// }.toIMap(),
|
||||||
|
// const ISet.empty(),
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> removeReaction(
|
Future<void> removeReaction(
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,7 @@ class RoomsController extends Notifier<IMap<String, Room>> {
|
||||||
@override
|
@override
|
||||||
IMap<String, Room> build() => const IMap.empty();
|
IMap<String, Room> build() => const IMap.empty();
|
||||||
|
|
||||||
void update(
|
void update(IMap<String, Room> rooms, ISet<String> leftRooms) {
|
||||||
IMap<String, Room> rooms,
|
|
||||||
ISet<String> leftRooms, {
|
|
||||||
bool addToNewEvents = true,
|
|
||||||
}) {
|
|
||||||
final merged = rooms.entries.fold(state, (acc, entry) {
|
final merged = rooms.entries.fold(state, (acc, entry) {
|
||||||
final roomId = entry.key;
|
final roomId = entry.key;
|
||||||
final incoming = entry.value;
|
final incoming = entry.value;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue